TIL Series #1 – Anacron Tutorial
Back-story: My dad usually asks us to send the public IP (Home network) to him daily (don’t ask me why) and like always I usually forget to and it occurred to me I could just set up a script to do that.
So while looking cron up, I wondered what would happen if my system was down and it missed it’s scheduled job. Looked it up and I found that cron does not run said job at boot up. This is where Anacron comes in. Unfortunately you can only run it once a day. But that was good enough for what I wanted to do.
- Say I want to run script.sh everyday then the entry would be
1 5 dad.daily /bin/sh /home/anna/script.shThe first column is for the frequency of execution of the job, the second is for the delay before the job begins, the third column is the name you assign to the job and the fourth column is for the command to be executed.