So if you’re not a linux or UNIX geek, you’re probably wondering what on earth this is.Â Well, simple enough, Cron is a thing in Linux or UNIX operating systems that will do stuff on a schedule.Â Specifically, it can execute a script at a given time on a given day, recurringly.Â (Is recurringly a word?)Â Â So Cron is really good for stuff like backups, for example.
I’m writing this post because I’m tired of having to Google the syntax every time I want to edit my Cront settings, so I’ve put it here… so I can search my blog instead 🙂
Bye for now.
*Â Â Â Â *Â Â *Â Â *Â Â Â *Â 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)
Changing the parameter values as below will cause this command to run at different time schedule below :
min hour day/month month day/week Execution time 30 0 1 1,6,12 * — 00:30 HrsÂ on 1st of Jan, June & Dec.
0 20 * 10 1-5 –8.00 PM every weekday (Mon-Fri) only in Oct.
0 0 1,10,15 * * — midnight on 1st ,10th & 15th of month
5,10 0 10 * 1 — At 12.05,12.10 every Monday & on 10th of every month :