Cron produces error regardless script runs ok or no

Whatever I did I`m getting cron.err crond. But the script is running and exiting normally without any issues in results. Only in logread its being logged as error.
here is the logread

Thu Jan  2 19:07:55 2025 cron.err crond[12061]: crond (busybox 1.36.1) started, log level 7
Thu Jan  2 19:07:56 2025 authpriv.info dropbear[12004]: Exit (root) from <192.168.0.5:44508>: Disconnect received
Thu Jan  2 19:10:00 2025 cron.err crond[12061]: USER root pid 12086 cmd /bin/bash /root/ont.sh >> /root/ont.log 2>&1

actual crontab:

root@OpenWrt:~# crontab -l
SHELL=/bin/bash
PATH=/usr/sbin:/usr/bin:/sbin:/bin
30 4 * * 0 /bin/bash /root/ont.sh

I tried without explicitly pointing shell to bash then tried without $PATH and each time script runs perfectly except logread shows that cron.err.

can it be because of log level ? or its something else that I am missing ?
thanks

Just another of the typical types of constraints imposed on embedded systems with relatively low resources.

OpenWrt uses the BusyBox software suite that was specifically designed for said limited user space resources. It incorporates several Unix utilities in a single executable file running in a POSIX environment, crontab being one.

cron.err is the normal logging response under OpenWrt for most any crontab logged response - Not necessarily an Error condition.

You can define cronloglevel in /etc/config/system default is 5.

2 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.