cannot reboot from a script ran by root's crontab
Jim Weeks
jim at jwweeks.com
Sat Jun 14 10:43:16 PDT 2003
On Thu, 12 Jun 2003, PsYxAkIaS (FreeBSD) wrote:
> $ cat /usr/sbin/checkre
> #!/bin/bash
> mkdir /tmp/reboot
> reboot now
I would assume that crontab can't find "reboot", ie "sbin" isn't in your
path. (/sbin/reboot now)
> $ crontab -l
> 0,5,10,15,20,25,30,35,40,45,50,55 * * * * /usr/sbin/checkre >/dev/null 2>&1
This could be more easily written in this manner;
0-59/5 * * * * /usr/sbin/checkre >/dev/null 2>&1
BTW, ">/dev/null" is the reason you aren't seeing the "not found error".
Hope this helps,
--
Jim
More information about the freebsd-isp
mailing list