FS#50921 - [cronie] add files on /etc/cron.d for daily, weekly and monthly jobs

Attached to Project: Arch Linux
Opened by Luis Henrique Mello (lmello) - Tuesday, 27 September 2016, 02:13 GMT
Last edited by Gaetan Bisson (vesath) - Tuesday, 27 September 2016, 20:28 GMT
Task Type Feature Request
Category Packages: Core
Status Closed
Assigned To Gaetan Bisson (vesath)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
cronie installs these files on /etc:

$ pacman -Ql cronie

cronie /etc/
cronie /etc/anacrontab
cronie /etc/cron.d/
cronie /etc/cron.d/0hourly
cronie /etc/cron.daily/
cronie /etc/cron.deny
cronie /etc/cron.hourly/
cronie /etc/cron.hourly/0anacron
cronie /etc/cron.monthly/
cronie /etc/cron.weekly/
cronie /etc/pam.d/
cronie /etc/pam.d/crond

The file /etc/cron.d/0hourly contains:

# Run the hourly jobs
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
01 * * * * root run-parts /etc/cron.hourly

and /etc/cron.hourly/0anacron is a script to run anacron.

It would be nice for this package to include upon installation files similar to 0hourly (named 0daily, 0weekly and 0monthly) on the same directory to make cronie configuration easier and more intuitive for newcomers.

Additional info:
cronie 1.5.1-1
This task depends upon

Closed by  Gaetan Bisson (vesath)
Tuesday, 27 September 2016, 20:28 GMT
Reason for closing:  Works for me
Comment by Gaetan Bisson (vesath) - Tuesday, 27 September 2016, 17:35 GMT
Why? Anacron (which is started every hour as you point out) will run everything under cronie /etc/cron.daily/ at least once a day. Isn't that enough? There's no need for 0daily.
Comment by Luis Henrique Mello (lmello) - Tuesday, 27 September 2016, 19:50 GMT
What about weekly and monthly jobs?

Perhaps instead of /etc/cron.d/0hourly there could be a /etc/cron.d/0global file with run-parts instructions for each cron directory.
   0global (0.2 KiB)
Comment by Gaetan Bisson (vesath) - Tuesday, 27 September 2016, 19:58 GMT
Weekly and monthly jobs are also handled as I described by anacron. What you propose is exactly what is implemented exept 0global is called 0hourly.

As it is, our package runs hourly, daily, weekly, and monthly jobs just fine. So I do not unerstand what feature you're suggesting we implement.
Comment by Gaetan Bisson (vesath) - Tuesday, 27 September 2016, 20:01 GMT
P.S. Running daily/weekly/monthly jobs through anacron rather than 0global is much more reliable: anacron will compensate for any missed schedule, whereas if your system is down when 0global was scheduled to run, your monthly script will wait another month...
Comment by Luis Henrique Mello (lmello) - Tuesday, 27 September 2016, 20:03 GMT
I understand, now I saw the /etc/anacrontab
Comment by Luis Henrique Mello (lmello) - Tuesday, 27 September 2016, 20:06 GMT
Well, I requested a closure before reading your PS... the cron wiki is somewhat confused so that's why I opened this task.

thanks
Comment by Gaetan Bisson (vesath) - Tuesday, 27 September 2016, 20:27 GMT
Ah, I see. Feel free to update the wiki. Cheers.

Loading...