cron/anacron not running anymore
Hi, my Cronjob monitoring shows that the cronjobs are no more executed Cronjob (xxx): last run -> next run => jons at /etc/cron.xxx Daily: 20231224 -> 2023-12-25 => download_openSUSE duc-index Weekly: 20231223 -> 2023-12-30 => Sicher_LUG-VS Monthly: 20231221 -> 2024-01-21 => SicherPC checkdisks if I execute, I see the following error # /etc/cron.hourly/0anacron /etc/cron.hourly/0anacron: line 11: /etc/default/anacron: No such file or directory # bat /etc/cron.hourly/0anacron ───────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── │ File: /etc/cron.hourly/0anacron ───────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 1 │ #!/bin/sh 2 │ # Check whether 0anacron was run today already 3 │ if test -r /var/spool/anacron/cron.daily; then 4 │ day=`cat /var/spool/anacron/cron.daily` 5 │ fi 6 │ if [ `date +%Y%m%d` = "$day" ]; then 7 │ exit 0 8 │ fi 9 │ 10 │ # Check whether run on battery should be allowed 11 │ . /etc/default/anacron 12 │ 13 │ if [ "$ANACRON_RUN_ON_BATTERY_POWER" != "yes" ]; then 14 │ 15 │ # Do not run jobs when on battery power 16 │ online=1 17 │ for psupply in /sys/class/power_supply/* ; do 18 │ if [ `cat "$psupply/type" 2>/dev/null`x = Mainsx ] && [ -f "$psupply/online" ]; then 19 │ if [ `cat "$psupply/online" 2>/dev/null`x = 1x ]; then 20 │ online=1 21 │ break 22 │ else 23 │ online=0 24 │ fi 25 │ fi 26 │ done 27 │ if [ $online = 0 ]; then 28 │ exit 0 29 │ fi 30 │ 31 │ fi 32 │ /usr/sbin/anacron -s ───────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── At the previous version line 11 was not included (according my backup from 21.12.2023). If I copy the old version back it works fine again. I wish all happy New Year Ulf
On 28.12.2023 20:41, Ulf via openSUSE Factory wrote:
Hi,
my Cronjob monitoring shows that the cronjobs are no more executed Cronjob (xxx): last run -> next run => jons at /etc/cron.xxx Daily: 20231224 -> 2023-12-25 => download_openSUSE duc-index Weekly: 20231223 -> 2023-12-30 => Sicher_LUG-VS Monthly: 20231221 -> 2024-01-21 => SicherPC checkdisks
if I execute, I see the following error # /etc/cron.hourly/0anacron /etc/cron.hourly/0anacron: line 11: /etc/default/anacron: No such file or directory
This is fixed upstream https://github.com/cronie-crond/cronie/commit/7700b1465d32ddb1d3988e9af852af... you may consider bug report.
# bat /etc/cron.hourly/0anacron ───────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── │ File: /etc/cron.hourly/0anacron ───────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 1 │ #!/bin/sh 2 │ # Check whether 0anacron was run today already 3 │ if test -r /var/spool/anacron/cron.daily; then 4 │ day=`cat /var/spool/anacron/cron.daily` 5 │ fi 6 │ if [ `date +%Y%m%d` = "$day" ]; then 7 │ exit 0 8 │ fi 9 │ 10 │ # Check whether run on battery should be allowed 11 │ . /etc/default/anacron 12 │ 13 │ if [ "$ANACRON_RUN_ON_BATTERY_POWER" != "yes" ]; then 14 │ 15 │ # Do not run jobs when on battery power 16 │ online=1 17 │ for psupply in /sys/class/power_supply/* ; do 18 │ if [ `cat "$psupply/type" 2>/dev/null`x = Mainsx ] && [ -f "$psupply/online" ]; then 19 │ if [ `cat "$psupply/online" 2>/dev/null`x = 1x ]; then 20 │ online=1 21 │ break 22 │ else 23 │ online=0 24 │ fi 25 │ fi 26 │ done 27 │ if [ $online = 0 ]; then 28 │ exit 0 29 │ fi 30 │ 31 │ fi 32 │ /usr/sbin/anacron -s ───────┴───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
At the previous version line 11 was not included (according my backup from 21.12.2023).
If I copy the old version back it works fine again.
I wish all happy New Year Ulf
On Thu, 28 Dec 2023, 19:52:50 +0100, Andrei Borzenkov wrote:
On 28.12.2023 20:41, Ulf via openSUSE Factory wrote:
Hi,
my Cronjob monitoring shows that the cronjobs are no more executed Cronjob (xxx): last run -> next run => jons at /etc/cron.xxx Daily: 20231224 -> 2023-12-25 => download_openSUSE duc-index Weekly: 20231223 -> 2023-12-30 => Sicher_LUG-VS Monthly: 20231221 -> 2024-01-21 => SicherPC checkdisks
if I execute, I see the following error # /etc/cron.hourly/0anacron /etc/cron.hourly/0anacron: line 11: /etc/default/anacron: No such file or directory
This is fixed upstream
https://github.com/cronie-crond/cronie/commit/7700b1465d32ddb1d3988e9af852af...
you may consider bug report.
which is already there: Bug 1218377 - cronie-anacron-1.7.0: missing /etc/default/anacron Cheers. l8er manfred
Am Donnerstag, 28. Dezember 2023, 20:01:09 CET schrieb Manfred Hollstein:
which is already there: Bug 1218377 - cronie-anacron-1.7.0: missing /etc/default/anacron
OK, added me to the CC list: https://bugzilla.opensuse.org/show_bug.cgi?id=1218377 Thanks Ulf
participants (3)
-
Andrei Borzenkov
-
Manfred Hollstein
-
Ulf