Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
cronie w/ anacron flag not working out of the box?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Nlestat
n00b
n00b


Joined: 28 May 2006
Posts: 2

PostPosted: Wed Dec 10, 2014 11:24 pm    Post subject: cronie w/ anacron flag not working out of the box? Reply with quote

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
View user's profile Send private message
szczerb
Veteran
Veteran


Joined: 24 Feb 2007
Posts: 1709
Location: Poland => Lodz

PostPosted: Thu Dec 11, 2014 9:53 am    Post subject: Reply with quote

If you want it on startup, then add it to a runlevel ;)

https://wiki.gentoo.org/wiki/Cron#anacron
Back to top
View user's profile Send private message
Nlestat
n00b
n00b


Joined: 28 May 2006
Posts: 2

PostPosted: Thu Dec 11, 2014 10:15 am    Post subject: Reply with quote

szczerb wrote:
If you want it on startup, then add it to a runlevel ;)

https://wiki.gentoo.org/wiki/Cron#anacron


Add what? I got crond running. There is no init script for anacron itself.
Back to top
View user's profile Send private message
szczerb
Veteran
Veteran


Joined: 24 Feb 2007
Posts: 1709
Location: Poland => Lodz

PostPosted: Thu Dec 11, 2014 11:57 am    Post subject: Reply with quote

Oh, cronie comes with integrated anacron implementation. Sorry about that. I have no idea then.
Back to top
View user's profile Send private message
sabayonino
Veteran
Veteran


Joined: 03 Jan 2012
Posts: 1014

PostPosted: Mon Dec 29, 2014 11:30 pm    Post subject: Reply with quote

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
View user's profile Send private message
kurisu
Apprentice
Apprentice


Joined: 19 Jan 2011
Posts: 159
Location: Munich, Germany

PostPosted: Fri Jan 23, 2015 8:45 am    Post subject: Reply with quote

Any solution for this yet? I temporarily fixed it for me by downgrading to 1.4.11-r1.
Back to top
View user's profile Send private message
kurisu
Apprentice
Apprentice


Joined: 19 Jan 2011
Posts: 159
Location: Munich, Germany

PostPosted: Fri Jan 23, 2015 10:36 pm    Post subject: Reply with quote

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
Code:
crontab -r

as root. Appears like my crontab was just messed up.
Back to top
View user's profile Send private message
kurisu
Apprentice
Apprentice


Joined: 19 Jan 2011
Posts: 159
Location: Munich, Germany

PostPosted: Tue Jan 27, 2015 8:46 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum