Thread: Why can't cron find a daemon to start/stop?
hello
trying start , stop applications <motion> , <motion2> using crond. cron jobs running root. have tried </etc/init.d/motion stop> , <service motion stop> type commands. both commands work command line sudo. neither work in cron.
cron jobs run root permissions shouldn't problem.
don't know why cron can't find jobs. can cause cron unable find commands????
below commands in cron.
below email received failed cron job. same error message attempts start/stop daemons.code:# shutdown motion 00 21 * * * /etc/init.d/motion stop 00 21 * * * /etc/init.d/motion2 stop # start motion 00 05 * * * /etc/init.d/motion start 00 05 * * * /etc/init.d/motion2 start
code:* stopping motion2 detection daemon motion2 /etc/init.d/motion2: 78: /etc/init.d/motion2: start-stop-daemon: not found ...fail!
hi
seems default cron root environment path setting not include location of program want run.
fixed doing a:
echo $path
in bash pasting path first line of root crontab
$path=<pasted in path>
peter pilsl answer.
Forum The Ubuntu Forum Community Ubuntu Specialised Support Ubuntu Servers, Cloud and Juju Server Platforms Why can't cron find a daemon to start/stop?
Ubuntu
Comments
Post a Comment