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.