Talk:Cron

From Gentoo Wiki
Jump to: navigation, search
Note
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

Talk status
This discussion is done as of Oct 6, 2013.

Hi, I would add some notes about the usage of anacron AND vixie-cron. In that case I usually use the following:

FILE /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:

FILE /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)
I got your point, I do not raccommend at all the run of multiple cron systems, but anacron is different: it needs to be run with another cron, without simply it doesn't work. So far this topic should be added in the anacron section rather in a new one.Zio-lupo (talk) 08:41, 11 October 2013 (UTC)
In that case, I'm okay with an additional section on "Using anacron" or so with this information. --SwifT (talk) 11:19, 13 October 2013 (UTC)
Thanks, added a new section "Using anacron", I think the discussion could be closed now. --Zio-lupo (talk) 08:35, 3 November 2013 (UTC)
Indeed. --SwifT (talk) 16:24, 3 November 2013 (UTC)

THE MESS

Talk status
This discussion is done.

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)

Please by all means. It is an open wiki. --SwifT (talk) 20:19, 4 December 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?

Talk status
This discussion is still ongoing.

At least for dcron, it is even suggested by the ebuild:

  1. dcron:
  2. This is NOT the system crontab! dcron does not support a system crontab.
  3. to get /etc/cron.{hourly|daily|weekly|montly} working with dcron run
  4. crontab /etc/crontab
  5. as root.
  6. NOTE: This will REPLACE root's current crontab!!

— Preceding unsigned comment added by Olek (talkcontribs)