Crontab Format: Minute Hour Day Week Month
RegisterLogin
Crontab Format: Minute Hour Day Week Month
Post Description: if you want to learn the format syntax for a crontab to work properly follow this format when editing the crontab files in your linux server
Tags: crontab, format:, minute, hour, day, week, month
This Post Was Posted On Apr 18, 2010 By Webune Support #3385
Post Description: if you want to learn the format syntax for a crontab to work properly follow this format when editing the crontab files in your linux server
Tags: crontab, format:, minute, hour, day, week, month
This Post Was Posted On Apr 18, 2010 By Webune Support #3385
Crontab Format: Minute Hour Day Week Month by Webune Support
for example, i have this:
02 4 * * * * root SomeScript /etc/mycrons
the above command begins with five fields that specify the time. the fields are:
0-59 = minute
0-23 = hour
1-31 = day
1-12 = month
0-7 = week
here is a breakdown:
* * * * * command to be executed - - - - - | | | | | | | | | +----- day of week (0 - 6) (Sunday=0) | | | +------- month (1 - 12) | | +--------- day of month (1 - 31) | +----------- hour (0 - 23) +------------- min (0 - 59)
if you had something more complicated like lets say you want to run the script on every Friday the 13th... 5 1 13 * 5 root SomeScript /etc/mycrons
5 = 5 minutes past the hour
1 = 01:00 (1am)
13 = day of the month
* = month (in this case, we leave * to ANY month)
5 = Friday
hope that helps
Leave Your Comments
Related Pages: [Add Your Website]
Post New Topic
mandep
#4419 1
this is not good example
Sep 06, 2010 Reply Report abuse
©2012 Webune Forums - Thu Dec 13, 2012 7:15 am
Powered by: Webune Forums V3
Powered by: Webune Forums V3