I want to run few crontabs at startup and also at regular intervals. I have used the below format -
# M H Dom Mon Dow
0 7-21/2 * * * //this will run daily from morning 7:00 to 21:00 clock with interval of 2hours each. ie. 7, 9, 11, 13 and so on.
@reboot //this will run everytime the system reboots
*/20 7-21 * * * //this will run for every 10 minutes from 7:00 to 21:00 clock
0 7-21/4 * * * //this will run for every 4hours from 7:00 to 21:00 clock
These are the 2 different cronjobs Ive set. I doubt if this works well. Please suggest changes required, if any. Thanks.
Check these crontab examples.This gives a detailed explanation of different formats.If you gogle you can find more
http://www.thegeekstuff.com/2009/06/15-practical-crontab-examples/
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments