[TriLUG] bash script execution time

Shane O'Donnell shaneodonnell at gmail.com
Fri Jul 8 17:54:54 EDT 2005


crontab allows for both ranges and intervals:

*/15 2-23 * * * command

should get you close, but it doesn't address the :30 requirement. 

HTH,

Shane O.

On 7/8/05, Howard Boyd II <boyd at qualexphoto.com> wrote:
> Now that I have a working script (thanks again for all the help!). I
> have a question about scheduling it to run. I want the script to execute
> every 15 minutes throughout the day except between the hours of 23:30
> and 02:30. My thinking is to schedule the script to run every 15 minutes
> via cron and then build some logic into the script that says if it is
> between the hours of 23:30 and 02:30, don't execute the heart of the
> script.
> 
> Can someone provide the logic/conditional statement for a bash script
> to check the time to see if it is between 23:30 and 02:30?
> 
> Is there some way of using cron alone to accomplish what I'm attempting
> to do?
> 
> Regards,
> 
> Howard
> 
> 
> ***********************************
> *    In my dreams, your dreams come true.
> *    Song: In My Dreams
> *    Artist: Josh Turner
> *    CD: Long Black Train
> ***********************************
> 
> 
> 
> --
> TriLUG mailing list        : http://www.trilug.org/mailman/listinfo/trilug
> TriLUG Organizational FAQ  : http://trilug.org/faq/
> TriLUG Member Services FAQ : http://members.trilug.org/services_faq/
> TriLUG PGP Keyring         : http://trilug.org/~chrish/trilug.asc
> 


-- 
Shane O.
========
Shane O'Donnell
shaneodonnell at gmail.com
====================



More information about the TriLUG mailing list