Each cronjob has following syntax:
# +---------------- minute (0 - 59) # | +------------- hour (0 - 23) # | | +---------- day of month (1 - 31) # | | | +------- month (1 - 12) # | | | | +---- day of week (0 - 6) (Sunday=0 or 7) # | | | | | * * * * * command to be executed
To get crontab to run a task every 10 minutes you could type as follow
*/10 * * * * /path/to/command
Once you set */10, the cronjob will be executed each time that the minute can be divided by 10 without remainder. etc 10/10, 20/10 30/10
using the same idea, you can divide the * by 2 3 or 59.
If you wish to run every minute, just put
To get crontab to run a task every minutes you could type as follow
* * * * * /path/to/command
To get this to work in Solaris, use the following example
0,10,20,30,40,50 * * * *
/path/to/command
Comments
Post a Comment