I'm working with some code that fires up cron on a server (which doesn't have it running at boot time). The script which starts cron sets up some logging stuff and then simply invokes cron
. It doesn't use /etc/init.d/cron
or service cron start
.
After starting cron this way, service cron status
and service cron stop
seem to be happily able to work, and the PIDFILE specified in /etc/init.d/cron
is present.
I put a log line into /etc/init.d/cron
, and it looks like running cron
standalone does not invoke the script.
# service cron status
script is running
* cron is running
# service cron stop
script is running
* Stopping periodic command scheduler cron [ OK ]
# cron
#
What's going on here? Is this simply because the cron
binary and the /etc/init.d/cron script use the same convention for the location of the pidfile?