[ELDK] crond not working

Germano Barreiro germano.barreiro at gmail.com
Fri Feb 26 17:51:02 CET 2010


Forgot to show the /etc/crontab contents

root at cbc:/root:# cat /etc/crontab
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
#---------------------------------------------------------------
# m  h  D  M  w  cmd
#---------------------------------------------------------------
*/1  *  *  *  *  root  /root/mestre

But, as you see, I just followed, step by step, the test you described
in your email. Everything equal.

On Fri, Feb 26, 2010 at 1:48 PM, Germano Barreiro
<germano.barreiro at gmail.com> wrote:
> Thanks, and you are right, my /etc/crontab missed that field.
> However, even after following the steps you described here, it didnt
> work for me yet. Something is for sure different in my system. It is a
> pity that the crond program dont give much output for helping to find
> out what it can be missing yet.
>
> root at cbc:/root:# cat /root/mestre
> #!/bin/sh
> echo ===== Running ===== >>/tmp/logfile
> date >>/tmp/logfile
> root at cbc:/root:# service crond status
> crond (pid 2046) is running...
> root at cbc:/root:# ls /tmp/logfile
> ls: cannot access /tmp/logfile: No such file or directory
> root at cbc:/root:# date
> Sat Feb 26 12:42:29 BRST 2000
> root at cbc:/root:# ls -la /etc/crontab
> -rw-r--r-- 1 root root 268 Dec 31  1969 /etc/crontab
> root at cbc:/root:# date
> Sat Feb 26 12:44:43 BRST 2000
> root at cbc:/root:# ls /tmp/logfile
> ls: cannot access /tmp/logfile: No such file or directory
>
>
> On Fri, Feb 26, 2010 at 1:01 PM, Stefano Babic <sbabic at denx.de> wrote:
>> Germano Barreiro wrote:
>>
>>>
>>> root at cbc:/root:# ls -la /etc/crontab
>>> -rw-r--r-- 1 root root 26 Dec 31  1969 /etc/crontab
>>>
>>> ... things dint work yet. This is not really a problem anymore since I
>>> can use an user crontab for the purpose of my system, and I'm posting
>>> this just as something that can be of general interest.
>>
>> It runs flawlessy, but you forget to add the "user" field in your
>> crontab - check with your linux PC.
>>
>> I tried with:
>>
>> SHELL=/bin/sh
>> PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
>> #---------------------------------------------------------------
>> # m  h  D  M  w  cmd
>> #---------------------------------------------------------------
>> */1  *  *  *  *  root  /root/mestre
>>
>> mestre is the example written by Wolfgang. Each minute you will get an
>> entry in /tmp/logfile.
>>
>> Regards,
>> Stefano Babic
>>
>> --
>> =====================================================================
>> DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
>> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
>> Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
>> =====================================================================
>>
>


More information about the eldk mailing list