View previous topic :: View next topic |
Author |
Message |
Nlestat n00b
Joined: 28 May 2006 Posts: 2
|
Posted: Wed Dec 10, 2014 11:24 pm Post subject: cronie w/ anacron flag not working out of the box? |
|
|
So all parts in /etc/crontab are conditional on anacron not being installed. anacrontab runs daily,weekly,monthly, but what runs anacron? There's /etc/cron.hourly/0anacron but nothing runs it. I found in cronie's doc folder a file 0hourly which I'm thinking is supposed to be installed in /etc/cron.d? |
|
Back to top |
|
|
szczerb Veteran
Joined: 24 Feb 2007 Posts: 1709 Location: Poland => Lodz
|
|
Back to top |
|
|
Nlestat n00b
Joined: 28 May 2006 Posts: 2
|
Posted: Thu Dec 11, 2014 10:15 am Post subject: |
|
|
Add what? I got crond running. There is no init script for anacron itself. |
|
Back to top |
|
|
szczerb Veteran
Joined: 24 Feb 2007 Posts: 1709 Location: Poland => Lodz
|
Posted: Thu Dec 11, 2014 11:57 am Post subject: |
|
|
Oh, cronie comes with integrated anacron implementation. Sorry about that. I have no idea then. |
|
Back to top |
|
|
sabayonino Veteran
Joined: 03 Jan 2012 Posts: 1014
|
Posted: Mon Dec 29, 2014 11:30 pm Post subject: |
|
|
hi
I've similar prob.
/etc/crontab works fine but /etc/cron.{hourly,daily,weekly,monthly} stop working after cronie update
Code: | Showing differences between /etc/crontab and /etc/._cfg0000_crontab
--- /etc/crontab 2014-10-30 21:31:33.000000000 +0100
+++ /etc/._cfg0000_crontab 2014-12-29 21:13:20.711135460 +0100
@@ -1,5 +1,5 @@
# for cronie
-# $Header: /var/cvsroot/gentoo-x86/sys-process/cronie/files/cronie-1.2-crontab,v 1.2 2009/05/12 09:10:59 bangert Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-process/cronie/files/cronie-1.3-crontab,v 1.2 2014/04/18 13:24:55 polynomial-c Exp $
# Global variables
SHELL=/bin/bash
@@ -8,12 +8,9 @@
HOME=/
# 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
-
-
+# if anacron is not present
+59 * * * * root [ ! -x /etc/cron.hourly/0anacron ] && rm -f /var/spool/cron/lastrun/cron.hourly
+9 3 * * * root [ ! -x /etc/cron.hourly/0anacron ] && rm -f /var/spool/cron/lastrun/cron.daily
+19 4 * * 6 root [ ! -x /etc/cron.hourly/0anacron ] && rm -f /var/spool/cron/lastrun/cron.weekly
+29 5 1 * * root [ ! -x /etc/cron.hourly/0anacron ] && rm -f /var/spool/cron/lastrun/cron.monthly
+*/10 * * * * root [ ! -x /etc/cron.hourly/0anacron ] && { test -x /usr/sbin/run-crons && /usr/sbin/run-crons ; }
|
replacing config file , "anacron" stop works _________________ LRS i586 on G.Drive
LRS x86-64 EFI on MEGA |
|
Back to top |
|
|
kurisu Apprentice
Joined: 19 Jan 2011 Posts: 159 Location: Munich, Germany
|
Posted: Fri Jan 23, 2015 8:45 am Post subject: |
|
|
Any solution for this yet? I temporarily fixed it for me by downgrading to 1.4.11-r1. |
|
Back to top |
|
|
kurisu Apprentice
Joined: 19 Jan 2011 Posts: 159 Location: Munich, Germany
|
Posted: Fri Jan 23, 2015 10:36 pm Post subject: |
|
|
After switching back to 1.4.12 and receiving a myriad of mails telling me
Code: | "/bin/bash: root: command not found" |
I have finally managed to resolve this by simply issuing
as root. Appears like my crontab was just messed up. |
|
Back to top |
|
|
kurisu Apprentice
Joined: 19 Jan 2011 Posts: 159 Location: Munich, Germany
|
Posted: Tue Jan 27, 2015 8:46 pm Post subject: |
|
|
I was mistaken. Just like OP argues right at the beginning of this thread, anacron implementation seems indeed broken in current cronie, i.e. is not being executed at all. Testing dcron now which supports anacron-like features as well. No hassles so far.
Edit (2015/02/08):
Looks good so far. Having been running dcron for almost 2 weeks now, I can tell that jobs in /etc/cron.{hourly,daily,weekly,monthly} are executed properly, even if the system is shut down during times defined in /etc/crontab. Apart from having to run
Code: | crontab /etc/crontab |
as root once right after install, dcron just works and anacron-like features come out-of-the-box. |
|
Back to top |
|
|
|