Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
bug or stupid mistake : cron is not working
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
destroyedlolo
l33t
l33t


Joined: 17 Jun 2011
Posts: 846
Location: Close to Annecy (France)

PostPosted: Fri Oct 24, 2014 9:17 pm    Post subject: bug or stupid mistake : cron is not working Reply with quote

Hello,

I've installed vixie-cron but I'm not able to launch anything from my own user (laurent).

I'm part of cron group
Code:
bPI ~ # id laurent
uid=1000(laurent) gid=1000(laurent) groupes=1000(laurent),10(wheel),14(uucp),18(audio),19(cdrom),85(usb),100(users),250(portage),70(postgres),[b]16(cron)[/b],1001(deluge),33(www-data)


my crontab is set as :
Code:

# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.XXXX5KR9ql installed on Fri Oct 24 22:56:24 2014)
# (Cron version V5.0 -- $Id: crontab.c,v 1.12 2004/01/23 18:56:42 vixie Exp $)
SHELL=/bin/bash
PATH=/usr/bin


17 22 * * * analog -G +gConfig/Stat_analog.cfg | grep '^r[[:space:]]lRS' | awk 'BEGIN { IGNORECASE = 1; OFS="\t"} {  {print $4, $5, ( $NF ~ /\.jpg$/ ) ? "t":"f" , $NF } }' | psql www -c 'TRUNCATE stat_req; COPY stat_req FROM STDIN;'
57 22 * * * touch /tmp/ok


which is perfectly reflected in
Code:
bPI ~ # cat /var/spool/cron/crontabs/laurent
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.XXXX5KR9ql installed on Fri Oct 24 22:56:24 2014)
# (Cron version V5.0 -- $Id: crontab.c,v 1.12 2004/01/23 18:56:42 vixie Exp $)
SHELL=/bin/bash
PATH=/usr/bin


17 22 * * * analog -G +gConfig/Stat_analog.cfg | grep '^r[[:space:]]lRS' | awk 'BEGIN { IGNORECASE = 1; OFS="\t"} {  {print $4, $5, ( $NF ~ /\.jpg$/ ) ? "t":"f" , $NF } }' | psql www -c 'TRUNCATE stat_req; COPY stat_req FROM STDIN;'
57 22 * * * touch /tmp/ok


but after 22:57, /tmp/ok is not created.

I tested w/ /etc/cron.allow containing "laurent" but w/o success.

And yes, cron is running :
Code:
bPI ~ # ps aux | grep cron
root       867  0.0  0.0   4168   732 ?        Ss   22:40   0:00 /usr/sbin/cron
root      1065  0.0  0.1   4456   972 pts/5    S+   23:16   0:00 grep --colour=auto cron


So, did I missed something or ... am I facing a bug ?

Thanks

Laurent
Back to top
View user's profile Send private message
Tony0945
Watchman
Watchman


Joined: 25 Jul 2006
Posts: 5127
Location: Illinois, USA

PostPosted: Fri Oct 24, 2014 10:31 pm    Post subject: Reply with quote

Put that long command into a script file and try running it. I did this with my nightly eix fetch and found it had a bug. After fixing the bug and confirming it by running the script, it now runs great.
Back to top
View user's profile Send private message
Tony0945
Watchman
Watchman


Joined: 25 Jul 2006
Posts: 5127
Location: Illinois, USA

PostPosted: Fri Oct 24, 2014 10:33 pm    Post subject: Reply with quote

Did you run?
Code:
rc-update add vixie-cron
Just asking.
Back to top
View user's profile Send private message
destroyedlolo
l33t
l33t


Joined: 17 Jun 2011
Posts: 846
Location: Close to Annecy (France)

PostPosted: Sat Oct 25, 2014 12:43 am    Post subject: Reply with quote

Yes, my long line is working from the command line and all executable are accessible from the PATH.
And yes, the cron daemon is running.
Back to top
View user's profile Send private message
destroyedlolo
l33t
l33t


Joined: 17 Jun 2011
Posts: 846
Location: Close to Annecy (France)

PostPosted: Sun Oct 26, 2014 10:38 am    Post subject: Reply with quote

Well well well, I tried to debug this morning ... and now it's working.
Nothing changed but the switch to winter time (no DST anymore) ... or perhaps because I did my test on the morning and not in the afternoon.

I need to do more testing ...
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