Why is anacron usually set up to only run checks from 07:00 to 23:00?

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Why is anacron usually set up to only run checks from 07:00 to 23:00?

Chris Green
I have a daily backup that is run by a script in /etc/cron.daily, this
is thus controlled by anacron so that it gets run once a day even if
the system isn't turned on all the time.

I noticed that the backup gets run at about 07:30 and on checking how
anacron is configured I notice that it only runs hourly from 07:00
through to 23:00.

On modern systems this is configured by systemd (systemctl edit --full
anacron.timer), on non-systemd systems there are other mechanisms but
it still has the same configuration with anacron only being run from
07:00 to 23:00.

Is there any reason that it's configured this way?  In particular is
there any downside to changing it to, say, 03:00 to 23:00?  I can't
really see any reason why one shouldn't schedule the anacron check
*every* hour but maybe there is a reason for having an 8 hour gap.

I want my backups run earlier so that there's less chance of me using
the system when the backup is running so I have changed the systemd
setting from "OnCalendar=*-*-* 07..23:30" to "OnCalendar=*-*-* 03..20:30".

My systems are *mostly* turned on all the time but not absolutely
always so anacron rather than cron is the best way to run the backups.

Chris Green

ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users