Anacron is a periodic command scheduler just like cron.

The only difference between Anacron and cron is that Anacron does not need your computer to be always running. You can schedule your tasks to run at any time. When your computer is off, the task will be executed the next time you turn the computer on.

Use the following command to install in Ubuntu:

sudo apt-get install anacron
Anacron works similar to cron. You can add your job to the /etc/anacrontab file.

The syntax to add a job is

period   delay-after-computer-start   job-identifier   command

# These replace cron's entries
1       5       cron.daily      run-parts --report /etc/cron.daily
7       10      cron.weekly     run-parts --report /etc/cron.weekly
@monthly        15      cron.monthly    run-parts --report /etc/cron.monthly

The disadvantage of anacron is that it only deals with tasks on a daily, weekly or monthly schedule. You can’t use it for a hourly or minutes schedule.


Popular posts from this blog

Check MySQL query history from command line