Jump to Navigation

121 - crontab examples

There are various examples :

43 23 * * *                      Run at 23:43
0 17 * * 1                       Run at 17:00 every Monday
0,10 17 * * 0,2,3            Run at 17:00 & 17:10 every Sunday, Tuseday & Wednesday
0-10 17 1 * *                  Run at 1 minutue interval from 17:00 to 17:10 on the first of the month
0 0 1,15 * 1                    Run at 0:00 on Monday & the first  & 15th of the month
42 4 1 * *                        Run at 4:42 on the first of the month
0 21 * * 1-6                  Run at 21:00 from Monday to Saturday
0,10,20,30,40,50 * * * * Run at 10 munitues interval.
*/10 * * * *                       Run at 10 munitues interval
* 1 * * *                 Run at 1 minutes interval from 1:00 to 1:59
0 1 * * *                Run at 1:00
0 */1 * * *               Run at xx:00 (every hour 0 minutue)
0 * * * *                Run at xx:00 (every hour 0 minutue)
2 8-20/3 * * *                  Run at 8:02, 11:02, 14:02, 17:02, 20:02
30 5 1,15 * *            Run at 5:30 on the first & 15th of the month

* Run at 12:30pm on 1th Sunday, 2nd Sunday, 3rd Sunday, 4th SUnday

30 12 1-7 * * [ "$(date '+\%w' )" -eq 0 ] && date > /root/test.log
30 12 8-14 * * [ "$(date '+\%w' )" -eq 0 ] && date > /root/test.log
30 12 15-21 * * [ "$(date '+\%w' )" -eq 0 ] && date > /root/test.log
30 12 22-28 * * [ "$(date '+\%w' )" -eq 0 ] && date > /root/test.log

 

 

 

 

 



Main menu 2

Story | by Dr. Radut