This is Gentoo's testing wiki. It is a non-operational environment and its textual content is outdated.
Please visit our production wiki at https://wiki.gentoo.org
Talk:Cron
This is a talk page. Please add newer comments below older ones, and sign your comments using four tildes (
~~~~
).
When adding a new section (at the bottom of the page), please mark it as "open for discussion" by using {{talk|open}}
so it will show up in the list of open discussions.anacron AND vixie-cron
Hi, I would add some notes about the usage of anacron AND vixie-cron. In that case I usually use the following:
/etc/crontab
# check scripts in cron.hourly, cron.daily, cron.weekly and cron.monthly 59 * * * * root rm -f /var/spool/cron/lastrun/cron.hourly #9 3 * * * root rm -f /var/spool/cron/lastrun/cron.daily #19 4 * * 6 root rm -f /var/spool/cron/lastrun/cron.weekly #29 5 1 * * root rm -f /var/spool/cron/lastrun/cron.monthly #*/10 * * * * root test -x /usr/sbin/run-crons && /usr/sbin/run-crons @hourly root nice -n 19 run-parts --report /etc/cron.hourly
as you see the daily,weekly and monthly part of the lastrun deletion is commented since I let anacron to perform the job as set in /etc/anacrontab:
/etc/anacrontab
1 5 cron.daily run-parts /etc/cron.daily 7 10 cron.weekly run-parts /etc/cron.weekly 30 15 cron.monthly run-parts /etc/cron.monthly
Without these changes the daily,weekly and monthly parts will be executed twice. Regards Giampiero
--Zio-lupo (talk) 08:28, 5 October 2013 (UTC)
- I personally don't recommend to use multiple cron systems concurrently, but if it needs to be documented, it might be better to add a "Multiple crons concurrently" section (as another section where the cron systems themselves are documented)? --SwifT (talk) 13:07, 6 October 2013 (UTC)
THE MESS
yeah if we can start getting sub pages of the cron daemons with install instructions and details going, and clean up some of this page... that would be great. 666threesixes666 (talk) 23:53, 29 November 2013 (UTC)
- We can transition this a meta article, which is probably the best choice. Then each set of software can be broken out if desired. --Maffblaster (talk) 19:37, 15 August 2016 (UTC)
"If you chose dcron or fcron, do not run crontab /etc/crontab." Why?
At least for dcron, it is even suggested by the ebuild:
- dcron:
- This is NOT the system crontab! dcron does not support a system crontab.
- to get /etc/cron.{hourly|daily|weekly|montly} working with dcron run
- crontab /etc/crontab
- as root.
- NOTE: This will REPLACE root's current crontab!!
— Preceding unsigned comment added by Olek (talk • contribs)