On 4/13/26 10:17 PM, Vincent Lefevre wrote:
On 2026-04-13 21:20:13 +0700, Lin Qigang wrote:
On 4/13/26 8:53 PM, Fiona Klute wrote:
But why is anacron.service started during installation at all? Shouldn't
only the timer unit be started, which can then start the service unit in
turn if needed (in the background)?

If my understanding is correct and the service unit should be started
only via the timer, the actual problem is likely the [Install] section
(which makes the service run independently of the timer). None of the
other service units started via timer on my system have it.

Anacron is unique. Please look at the source file debian/README.debian:

```
Anacron itself however is not a daemon, so it will either be called at
startup, on APM power status change, on systemd timer or by cron.
Disabling those will result in some jobs not being executed on time.
```

Precisely. This does *not* include install time. So the current
behavior to run anacron at installation time (which includes upgrades)
seems buggy.

Since the jobs that are run from an install or upgrade should be run for that day, I don't think the jobs need to be in the time window of 7:30-23:30 triggered by the timer. The jobs may be executed earlier in the day, but this would still be for jobs that were planned to be run.

The install section was removed from the service file before and added again since this caused issues. If there is an actual issue with the install section, I will debug this via a new issue since this one will close with the next release of anacron 2.3-50.

--
Lance Lin
GPG Fingerprint: 4A31 DB5A 1EE4 096C 8739 9880 9036 4929 4C33 F9B7

Attachment: OpenPGP_0x903649294C33F9B7.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to