Open AndyM48 opened 3 months ago
Perhaps bootrun man should read:
bootrun Run an &-line at fcron's startup, or system's resume after suspend/hibernation if it should have run during system down time.
?
I wonder if fcron had a chance to save the state when you rebooted. If it didn't, then it wouldn't know that the job was already run so it would run it (again).
Do you see a line like:
2024-08-22T17:34:31.113829+01:00 <cron.debug> fcron[84153]: Saving systab...
right before the reboot?
If not:
I wonder if fcron had a chance to save the state when you rebooted. If it didn't, then it wouldn't know that the job was already run so it would run it (again).
Right, so my settings/understanding are not wrong. I cannot remember a line like that in the log, so that may be the problem, I will need to do some checks to see.
For the record:
Thank you for your help
Logically I think your assumption is correct. 'Clean' reboot did not show duplicate cron jobs. But: I cannot find any messages similar to the one you showed, anywhere. Where should I expect to find it? I looked in crond.log and also ran a grep -r as root, in the logs folder /var/log.
Those are DEBUG log-level messages. To see them, you need to:
--debug
$ cat > /etc/rsyslog.d/10-fcron.conf <<_EOF
$template precise,"%timegenerated:::date-rfc3339% <%PRI-text%> %syslogtag% %msg%\n"
cron.* /var/log/cron.log;precise
_EOF
I have a job:
&bootrun 0 5 * * * /usr/sbin/logwatch --output mail
My understanding is that this job will run at 5 minutes after midnight every day, and at reboot/resume if missed:bootrun Run an &-line at fcron's startup (or system's resume after suspend/hibernation) if it should have run during system down time
In fact the job runs as expected, except that it runs a second time at reboot, so clearly I don't understandbootrun
correctly.Log: