Page 1 of 1

crond not monitored by restart_service — silent failure of all scheduled tasks

Posted: 09 Mar 2026, 14:32
by Frynes
From the context of a SMB file copy on MacOS finder that needed to be killed...found that crond did not restart after reboot NAS.

# crond not monitored by restart_service — silent failure of all scheduled tasks

**Model:** F4-212

**TOS Version:** 5.1.73-00078

## Summary

If crond dies for any reason, TOS's `restart_service` daemon does not detect or restart it. All scheduled tasks stop silently — including TOS's own `everyminuteexec`, `everyhourexec`, and `everydayexec`. There is no alert or notification. crond stays dead until the NAS is manually rebooted.

## Steps to reproduce

1. SSH into the NAS
2. Run `kill $(pidof crond)`
3. Wait — crond never restarts, no notification appears in TOS
4. Verify with `pidof crond` — returns nothing
5. TOS scheduled tasks (including the every-minute standby wake-up check) no longer run

## Expected behavior

`restart_service` should monitor crond and auto-restart it if it dies, or at minimum generate an alert in the TOS notification center. crond is critical infrastructure — without it, no TOS scheduled tasks run and there is no visible indication of the failure.

## Additional notes

- crond is a busybox applet (`/usr/sbin/crond -> ../../bin/busybox`). It can be killed by broad kill commands (e.g. `killall`) that target other busybox applets.
- Busybox crond (v1.35.0) does not support `@reboot` or other `@` shorthand cron entries. Adding one silently prevents crond from starting at all — no error message is logged.
- The cron init script (`/etc/init.d/cron`) deletes and recreates `/var/spool/cron/crontabs/` on every start/restart, copying only from `/etc/crontabs/root`. Custom cron entries added via `crontab -e` are lost on restart.

Re: crond not monitored by restart_service — silent failure of all scheduled tasks

Posted: 09 Mar 2026, 15:36
by MikeZhang
Thank you very much for your detailed sharing. The methods you provided are of great help and reference value to other users who encounter similar problems.