Cron jobs not running on openwrt

Hello,

My system is,

root@OpenWrt:~# ubus call system board
{
        "kernel": "6.6.67",
        "hostname": "OpenWrt",
        "system": "ARMv8 Processor rev 3",
        "model": "Raspberry Pi 4 Model B Rev 1.1",
        "board_name": "raspberrypi,4-model-b",
        "rootfs_type": "ext4",
        "release": {
                "distribution": "OpenWrt",
                "version": "24.10.0-rc4",
                "revision": "r28211-d55754ce0d",
                "target": "bcm27xx/bcm2711",
                "description": "OpenWrt 24.10.0-rc4 r28211-d55754ce0d",
                "builddate": "1734915335"
        }
}

I setup a cron they never run.
cron system service is running,

root@OpenWrt:~# /etc/init.d/cron status
active with no instances

Any thoughts?

post the log ?
post the crontab ?

root@OpenWrt:~# crontab -l
@reboot /root/dynv6.sh >> /root/ddns.log
@reboot /root/dynu.sh >> /root/ddns-dynu.log
*/5 * * * * /root/dynv6.sh >> /root/ddns.log
*/5 * * * * /root/dynu.sh >> /root/ddns-dynu.log
*/1 * * * * ls >> /root/test.log

and you obviously restarted cron after creating the schedule + the extra char/line ?
https://openwrt.org/docs/guide-user/base-system/cron#command-line_instructions

Thank you.
As per the notes, I left an empty line in cron
also ran service cron restart
And now cron start working.

1 Like

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