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.
On Mon, 19 Oct 2020 17:01:16 +0100 Chris Green cl@isbd.net wrote:
Is there any reason that it's configured this way?
I expect it's because 23:00 to 07:00 are usually quiet hours when people are most likely to be sleeping and some cron jobs do work the CPU enough for cooling fans to speed up, or access hard disks enough that they become noisy. Intermittently-on computers are often located where people live.
Extra noise during cron jobs may not be universal now with fanless/quiet computers and SSDs and so on, but it is probably still common enough for it to be a sensible default.
I know when I had a rack server in a home office temporarily a few years ago, I could tell that cron.daily typically ran at 1am!
Hope that informs,
On Fri, Oct 23, 2020 at 01:51:42PM +0100, MJ Ray wrote:
On Mon, 19 Oct 2020 17:01:16 +0100 Chris Green cl@isbd.net wrote:
Is there any reason that it's configured this way?
I expect it's because 23:00 to 07:00 are usually quiet hours when people are most likely to be sleeping and some cron jobs do work the CPU enough for cooling fans to speed up, or access hard disks enough that they become noisy. Intermittently-on computers are often located where people live.
Extra noise during cron jobs may not be universal now with fanless/quiet computers and SSDs and so on, but it is probably still common enough for it to be a sensible default.
I know when I had a rack server in a home office temporarily a few years ago, I could tell that cron.daily typically ran at 1am!
I guess you could well be right.
It was just annoying the way that my daily backups were always scheduled at the beginning of the day rather than in the small hours. I've changed it (as I proposed) to 03:00 to 20:00 and all seems well with my backups running around 03:30 now.