Cron not running
Frederic Schaer
rominet7777 at gmail.com
Fri Aug 2 10:33:14 UTC 2013
On 30/07/2013 10:13, Luca Ferrari wrote:
> On Tue, Jul 30, 2013 at 8:22 AM, Phil <phil_lor at bigpond.com> wrote:
>
>> phil at Asus:~$ crontab -l
>> #No comment
>> 20 16 * * * /home/phil/pretty.sh
>>
>
> Almost sturely cron will not be able to find and run the job since the
> pretty.sh script is not in the PATH. You have to modify the PATH of
> the user (permanently) or add a PATH definition on top of the crontab
> file configuration:
>
> $ crontab -e
> PATH=$PATH:$HOME
> 20 16 * * * /home/phil/pretty.sh
>
> and then make sure your script is executable. Finally to check that
> cron is running you have to:
> ps -auxw | grep cron
>
> Luca
>
Hi,
If you have an encrypted home folder (what for ??) , I doubt cron can read any file in there.
This is what I have here for the :
#$ ps -edfw|grep cron
root 1387 1 0 10:51 ? 00:00:00 cron
fred 15492 14584 0 12:22 pts/1 00:00:00 grep cron
Now, if you have cron running as a daemon (do you ?), you should see its logs here :
(I'm root here)
# grep cron /var/log/syslog
Aug 2 11:18:35 rominet anacron[1371]: Job `cron.daily' terminated
Aug 2 11:18:35 rominet anacron[1371]: Normal exit (1 job run)
Aug 2 12:17:01 rominet CRON[7926]: (root) CMD ( cd / && run-parts --report
/etc/cron.hourly)
Aug 2 12:25:44 rominet kernel: [ 5666.426318] init: cron main process (1387) killed by
TERM signal
Aug 2 12:25:44 rominet cron[20544]: (CRON) INFO (pidfile fd = 3)
Aug 2 12:25:44 rominet cron[20545]: (CRON) STARTUP (fork ok)
Aug 2 12:25:44 rominet cron[20545]: (CRON) INFO (Skipping @reboot jobs -- not system startup)
Aug 2 12:26:00 rominet crontab[20574]: (root) LIST (root)
I guess that startup errors will be loggued there too, or in /var/log/kernel, if you face
errors.
For the records, these are the packages I have (kubuntu 12.04) :
# dpkg -l|grep cron
ii anacron 2.3-14ubuntu1 cron-like program that doesn't go
by time
ii cron 3.0pl1-120ubuntu4 process scheduling daemon
But really, look at your home folder : encrypted -> failure is "normal"
Cheers
More information about the kubuntu-users
mailing list