[plug] Cron scheduling

Anthony J. Breeds-Taurima tony at cantech.net.au
Wed Oct 13 12:37:05 WST 1999


On Wed, 13 Oct 1999, Paul Baumgarten wrote:

> OK... Time to ask something I have been curious about for a little while.
> 
> I'm wanting to schedule jobs and I know the tool to use is Cron.  My problem
> is I have looked through all the Howtos and mini-howtos and can not find one
> for Cron.  I scanned through the man pages for Cron and Crontab but they
> don't explain very well how to create a scheduled job.  Can anyone point me
> to some useful documentation?

man 1 cron
man 1 crontab
man 5 crontab

should give you all the help you need BUT to summarize what you'll see there

each line in a crontab has the format
a b c d e f
              field          allowed values
              -----          --------------
a =           minute         0-59
b =           hour           0-23
c =           day of month   1-31
d =           month          1-12 (or names, see below)
e =           day of week    0-7 (0 or 7 is Sun, or use names)
f = the command to execute
you can use '* for any field you don't cat about

00 04 * * 2,3,4,5,6 [ -x /root/bin/backup ] && /root/bin/backup

Will run "[ -x /root/bin/backup ] && /root/bin/backup"
at 4:00am on Tuesday->Saturday

YMMV

Yours Tony.



More information about the plug mailing list