Expected output of /etc/init.d/<something> enabled

What is the expected output of /etc/init.d/ enabled?
Trying to troubleshoot why a cron job doesn't run and I don't get any output, before or after enabling it.

# /etc/init.d/cron enabled
# /etc/init.d/cron enable
# /etc/init.d/cron enabled
#
  • enable or disable: doesn't have an output. enable creates symlink(s) at /etc/rc.d and disable deletes them.
  • enabled: doesn't have an output. exit code '$?' is 0 if enabled, non-zero otherwise.
  • running: like enabled, but 0 if the service is running, non-zero otherwise.
3 Likes

checked crontab syntax ?
busybox crontab take fewer params.

https://openwrt.org/docs/guide-user/base-system/cron

2 Likes

I have the same job on several devices, some work, some don't. The issue is that cron was not running and I am trying to work out if cron is enabled or not.

does /etc/rc.d/S50cron exist ?

OK, this is the way to use that command then:

# /etc/init.d/cron enabled ; echo $?
1
1 Like

Yeah, I'm sorted now, thanks. I know what to look for.

1 Like

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