I have Anacron set up to run a backup daily, weekly and monthly. The monthly seems okay, but the daily and the weekly are running roughly every half hour every day!

Here is my /etc/anacrontab

# /etc/anacrontab: configuration file for anacron                                                                                                                                                                           
# See anacron(8) and anacrontab(5) for details.                                                                                                                                                                             
# 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
# PERIOD        DELAY   IDENTIFIER      COMMAND                                                               
@daily  3       Rsnapshot_daily /root/scripts/rsnapshot_launcher.sh daily                                     
@weekly 15      Rsnapshot_weekly        /root/scripts/rsnapshot_launcher.sh weekly                            
@monthly        30      Rsnapshot_monthly       /root/scripts/rsnapshot_launcher.sh monthly

I've checked /var/spool/anacron/Rsnapshot_daily and it has todays date in it and was last updated less than 30 minutes ago. It's now 6pm and the daily Rsnapshot task has been run 11 times today and the weekly 10 times so far.

What could be going on here? Thanks.

(this is on Kubuntu 20.04 LTS)


Thanks to @user313032 who posted this question and later responded to me when I asked him if he ever found a solution, the answer is as follows:

Replace @daily by 1 and it works. @daily doesn't exist. the only valid non-numerical interval is @monthly, since months do not have a fixed number of days.

I found that at the time of writing, every tutorial I've seen on the use of Anacron was incorrectly stating that @daily and @weekly were valid. Maybe they were at some point, but on the version of Anacron shipped with Kubuntu 20.04 LTS only the numeric values work, except for @montly which works correctly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.