CR-
01-31-2004, 05:05 AM
Getting Started with Crontab...
Type crontab -e as the user that you want the Cron Job to be executed as.
The format of the job is like this. I'm gonna use some varibles, you should remember
those from algebra, for those of you that don't it is a letter that represents another
value (usually a number).
a b c d e f
where...
a = The minute after the hour that you want it done
b = The hour you want it done (Military Time)
c = Day of the Month
d = Month of the Year
e = Day of the week
f = 'command'
5 0 * * * /usr/local/bin/email
Like the above example, /usr/local/bin/email, will run every night at 12:05 AM.
The * means to run every instance of the value in the field. Like a asterisk in the day field means to run everyday
Other Useful crontab commands
crontab -e opens the editor
crontab -l lists the contents of the crontab
crontab -r removes the crontab
My friend created this, so I can't take the credit, but hopefully someone finds it useful.
J.
Type crontab -e as the user that you want the Cron Job to be executed as.
The format of the job is like this. I'm gonna use some varibles, you should remember
those from algebra, for those of you that don't it is a letter that represents another
value (usually a number).
a b c d e f
where...
a = The minute after the hour that you want it done
b = The hour you want it done (Military Time)
c = Day of the Month
d = Month of the Year
e = Day of the week
f = 'command'
5 0 * * * /usr/local/bin/email
Like the above example, /usr/local/bin/email, will run every night at 12:05 AM.
The * means to run every instance of the value in the field. Like a asterisk in the day field means to run everyday
Other Useful crontab commands
crontab -e opens the editor
crontab -l lists the contents of the crontab
crontab -r removes the crontab
My friend created this, so I can't take the credit, but hopefully someone finds it useful.
J.
