-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cronie-1.7.1-r1 does not trigger cron.weekly or cron.monthly anymore, at least not in "anacron-mode" means PC was off by the time #178
Comments
I do not see any reason for that. Could that be some change in the gentoo packages not in the upstream sources? |
Currently I cannot tell, that there is something different in Gentoo. Cronie depends on sys-process/cronbase, which hasn't been updated since September 10th 2023. So the gentoo-guys potentially say the same just vice versa :) To me it looks like the anacron function is not working anymore. The only thing I could actually dig out is /etc/cron.hourly/0anacron has changed: previous version (from my backup):
current version:
I am not a pro for shell script but I cannot see anything super weird. |
maybe the line triggers the problem because the variable $ANACRON_RUN_ON_BATTERY_POWER isn't defined in this script... and again not a script-pro, but 1= "yes" means not-on-battery, which I wonder is what is really really intended... |
BTW: I have asked on IRC libera.chat #gentoo but I didn't get any reply on this typically very busy and competent channel |
BTW: /etc/cron.daily works well, fwiw |
Addition of this ANACRON_RUN_ON_BATTERY_POWER check was done before 1.7.0 though. |
Try running the 0anacron or even edit it to add set -x to see what is actually evaluated/executed. |
you are right, I see on my backup on Jan17th, that this file 0anacron already looks like today and my weekly backup ran last time successfully on Jan 20th |
with set -x sh 0anacron
|
interestingly /var/spool/anacron/cron.weekly says: 20240202 but I do not have the "reaction" of rsnapshot of that day |
/etc/anacrontab got touched on Jan 20th but diff shows, it is the same than in the past |
As as also edited in the main issue, I filed a downstream bug: |
I will correct the link to downstream bug as soon as I'm back home |
Done. |
I don't know what could've caused this on our end. We've had no other reports of it and the only difference between those cronie versions downstream was backporting the patches which landed upstream. No packaging changes otherwise. |
I like the Avatar and the Nick :-) back to the topic
|
I am afraid, that all this issue is maybe due to wrong expectations based on my experience with vixie-cron. I do understand, that cronie is partially working differently. However, from time to time I do invoke /etc/cron.daily or .weekly by hand.
Unfortunately I didn't find a good (and official cronie-) documentation, which explains clear and simple, how the mechanism works (whereas vixie-cron with its crontab entries was self explanatory). One has to read thru different man pages. Maybe default in Linux but here a bit challenging, when you are not well into it... I will unmask cronie-1.7.1-r1 and will observe it with my likely re-adjusted knowledge |
This is what anacron does. Of course it would be possible to run the daily/weekly jobs at a fixed time/date if anacron was not used to run them. |
please allow me to hold this issue open until next pass thru of cron.weekly and cron.monthly. I will close by then, if everything works as described here lately.
|
It depends on how many days this and the previous month had. So its at most 31days but can be 30, 28 or 29 (for February in leap years). |
thank you everybody for patience.... this issue was false alarm, my apologies!!! What happened:
|
After upgrading sys-process/cronie from 1.7.0-r2 to 1.7.1-r1 (gentoo), cronie does not invoke any of my scripts or commands in /etc/cron.weekly (see Edit_4 for .weekly) or cron.monthly. This worked fine since the year 2019....
EDIT_1:
ls -l | grep cron.
Edit_2
I have read this https://forums.gentoo.org/viewtopic-t-1108098-start-0.html and cannot find anything weird
Edit_3
I filed a downstream bug
https://bugs.gentoo.org/923953
Edit_4
I kept analysing further:
there was an error, but I cannot nail it down. It said:
why I say "didn't run well"? Because usually it says "Job `cron.weekly' started" or terminated, but not on the 4th (Sunday), where a normal cronjob should have run, if I am not mistaken
I studied a lot in the internet about anacrontab and cronie, but I still do not know, which day of the month, a monthly job should run if the machine is up and running
The text was updated successfully, but these errors were encountered: