Article 5250V Debian 10 anacron timing

Debian 10 anacron timing

by
l0f4r0
from LinuxQuestions.org on (#5250V)
Hi,

I installed anacron on my Debian 10 and I just want to be sure to understand how it works on Debian (I've read there are some distro-dependent configurations, including Debian) before I have some bad surprises ;)

Let's say I have a specific job "toto" inside /etc/cron.daily. This is one of the easiest use case.
Because I've installed anacron, everything in that directory is dealt with anacron, not cron.

Anacron seems to be launched via systemd timers, especially this one: /etc/systemd/system/timers.target.wants/anacron.timer

As I want my jobs to be launched during the night included and on battery as well, I have:
  • modified /etc/systemd/system/timers.target.wants/anacron.timer: I've replaced OnCalendar=*-*-* 07..23:30 by OnCalendar=*-*-* *:00
  • created a file /etc/systemd/system/anacron.service.d/on-ac.conf with the following content:
    Code:[Unit]
    ConditionACPower=
Questions:
  • Is my understanding above correct please?
  • Is anacron launched during startup as well or does it just depend on anacron.timer?
  • Is it true that I cannot be 100% sure that my job "toto" will be launched at least 1x/day with this configuration? For example, if later today I'm putting my PC on hibernation or sleep mode and I'm waking it up tomorrow from 14:10 to 14h50 only, my job won't be triggered, right? If so, would it be really heavy for the system to modify /etc/systemd/system/timers.target.wants/anacron.timer into OnCalendar=*-*-* *:*/10?
Thank you in advance :)latest?d=yIl2AUoC8zA latest?i=P5edtvVnQAc:f14kn_82azs:F7zBnMy latest?i=P5edtvVnQAc:f14kn_82azs:V_sGLiP latest?d=qj6IDK7rITs latest?i=P5edtvVnQAc:f14kn_82azs:gIN9vFwP5edtvVnQAc
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments