OpenWrt Forum Archive

Topic: Cron produces errors

The content of this topic has been archived on 7 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I'm running a cron script with the following entry in crontab -e:

* * * * * /scripts/test.sh > /tmp/test.log

/scripts/test.sh:

#!/bin/sh

echo "test"

But for some reason it produces an error in the log:

root@OpenWrt:~# logread
...
May  5 07:54:01 OpenWrt cron.err crond[1260]: USER root pid 6872 cmd /scripts/test.sh > /tmp/test.log

The code has been run though:

root@OpenWrt:~# cat /tmp/test.log 
test

Should I end the script in any special way to prevent it from producing an error, or what is wrong?

(Last edited by erikbjork on 5 May 2010, 07:22)

erikbjork, I have same kind of problem with normal cron command !

Ex:
echo "* * * * * echo \"Testing crond...\" | /usr/bin/logger -t crond" >> /etc/crontabs/root
(from Cron Introduction - OpenWrt Wiki)

Return me:
May 25 00:57:01 OpenWrt cron.err crond[1358]: USER root pid 1360 cmd echo \"Testing crond...\" | /usr/bin/logger -t crond"

Any idea ?

(Last edited by Merimac on 25 May 2010, 00:05)

As far as I remember, this is a busybox bug that has existed for a long time. It is reported in ticket 3981 (https://dev.openwrt.org/ticket/3981) , closed wontfix.

So it's normal if  all cron task return cron.err in syslog ?

Bug is still there on Kamikaze 8.09, r21756.

Ticket has been updated and it seems a fix is on the way.

Has this ever been fixed?

Running custom build of OpenWrt Backfire 10.03.1-RC6 /
LuCI 0.10 Branch 0.10+svn7500 and have the same problem.

Perazim

Its a cosmetic issue with very low priority. It will get fixed with a busybox update which backfire will not receive.

The discussion might have continued from here.