Hello,
Currently anacrontab is set 7 25 cron.weekly nice run-parts /etc/cron.weekly
It means that it run every Thursday. I am no satisfied by thus day. How can I have it running every Saturday ?
crontab is not activated #30 12 * * 6 root run-parts /etc/cron.weekly
6 would be the right day.
Thanks.
=========================================================================== Patrick DUPRÉ | | email: pdupre@gmx.com Laboratoire interdisciplinaire Carnot de Bourgogne 9 Avenue Alain Savary, BP 47870, 21078 DIJON Cedex FRANCE Tel: +33 (0)380395988 | | Room# D114A ===========================================================================
On 2/10/22 13:41, Patrick Dupre wrote:
Currently anacrontab is set 7 25 cron.weekly nice run-parts /etc/cron.weekly
It means that it run every Thursday. I am no satisfied by thus day. How can I have it running every Saturday ?
No, the man page for /etc/crontab says that both 0 and 7 stand for Sunday and that the hours go from 0 - 23.
On 2/10/22 13:41, Patrick Dupre wrote:
Currently anacrontab is set 7 25 cron.weekly nice run-parts /etc/cron.weekly
It means that it run every Thursday. I am no satisfied by thus day. How can I have it running every Saturday ?
No, the man page for /etc/crontab says that both 0 and 7 stand for Sunday and that the hours go from 0 - 23.
What do you mean NO?
users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
On 2/10/22 13:08, Patrick Dupre wrote:
On 2/10/22 13:41, Patrick Dupre wrote:
Currently anacrontab is set 7 25 cron.weekly nice run-parts /etc/cron.weekly
It means that it run every Thursday. I am no satisfied by thus day. How can I have it running every Saturday ?
No, the man page for /etc/crontab says that both 0 and 7 stand for Sunday and that the hours go from 0 - 23.
What do you mean NO?
Looking at the crontab settings that were "not activated", this indicates the day is 6 or Saturday (since 7 indicates Sunday). Thus, 4 would be Thursday.
#30 12 * * 6 root run-parts /etc/cron.weekly
The following would give you /etc/cron.weekly running at 12:30 every Thursday
30 12 * * 4 root run-parts /etc/cron.weekly
On 2/10/22 14:08, Patrick Dupre wrote:
On 2/10/22 13:41, Patrick Dupre wrote:
Currently anacrontab is set 7 25 cron.weekly nice run-parts /etc/cron.weekly
It means that it run every Thursday. I am no satisfied by thus day. How can I have it running every Saturday ?
No, the man page for /etc/crontab says that both 0 and 7 stand for Sunday and that the hours go from 0 - 23.
What do you mean NO?
Read the man page:
man /etc/crontab
And it will tell you exactly the same as what I wrote.
My fix to anacron is to eradicate it and run everything in cron which doesn't randomize run times :-).
Put back the traditional /etc/crontab and remove the /etc/cron.hourly/0anacron file, and now cron works the way it always did.
On Feb 10, 2022, at 15:42, Patrick Dupre pdupre@gmx.com wrote:
Hello,
Currently anacrontab is set 7 25 cron.weekly nice run-parts /etc/cron.weekly
It means that it run every Thursday. I am no satisfied by thus day. How can I have it running every Saturday ?
crontab is not activated #30 12 * * 6 root run-parts /etc/cron.weekly
6 would be the right day.
Take this advice with a grain of salt, I am writing this from a mobile device from memory of how it works.
Cron.weekly is launched from anacrontab, which doesn’t actually set a day of week, just the interval between runs. It checks a date in /var/spool/anacron/cron.weekly, and if it has been more than 7 days (that’s what the 7 stands for in that line) then it runs. Then it sets the date in the spool file for that day, so subsequent checks will reference it.
This is great to capture jobs that need to run if it’s been *more* than a week, but doesn’t actually help if you want to set weekly jobs to run on a certain day.
I can see two solutions:
1.) edit the spool file to be last Saturday.
2.) just use a regular cron job in/etc/cron.d/.
And yes, 6 is Saturday. I believe you can just use the word too in cronie. It is smart.
-- Jonathan Billings
On Thu, Feb 10, 2022 at 09:41:23PM +0100, Patrick Dupre wrote:
Hello,
Currently anacrontab is set 7 25 cron.weekly nice run-parts /etc/cron.weekly
It means that it run every Thursday. I am no satisfied by thus day. How can I have it running every Saturday ?
crontab is not activated #30 12 * * 6 root run-parts /etc/cron.weekly
6 would be the right day.
Run your job daily, but make the job a shell script. In the script run the date command to check the DOW. If it is Sat, run the real job. If not Sat, exit.
jl