View previous topic :: View next topic |
Author |
Message |
destroyedlolo l33t
Joined: 17 Jun 2011 Posts: 846 Location: Close to Annecy (France)
|
Posted: Fri Oct 24, 2014 9:17 pm Post subject: bug or stupid mistake : cron is not working |
|
|
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 |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Fri Oct 24, 2014 10:31 pm Post subject: |
|
|
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 |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Fri Oct 24, 2014 10:33 pm Post subject: |
|
|
Did you run? Code: | rc-update add vixie-cron | Just asking. |
|
Back to top |
|
|
destroyedlolo l33t
Joined: 17 Jun 2011 Posts: 846 Location: Close to Annecy (France)
|
Posted: Sat Oct 25, 2014 12:43 am Post subject: |
|
|
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 |
|
|
destroyedlolo l33t
Joined: 17 Jun 2011 Posts: 846 Location: Close to Annecy (France)
|
Posted: Sun Oct 26, 2014 10:38 am Post subject: |
|
|
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 |
|
|
|
|
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
|
|