<div class="gmail_quote">2011/7/12 Markus Schönhaber <span dir="ltr"><<a href="mailto:ubuntu-users@list-post.mks-mail.de">ubuntu-users@list-post.mks-mail.de</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
13.07.2011 00:02, Wipe_Out:<br>
<div class="im"><br>
> I have written a basic bash script to stop and restart xinetd as part of a<br>
> cleanup routine for a server we run.. When run from a prompt it runs<br>
> perfectly.. I have scheduled it to run every night as a cron job and every<br>
> night I get an email with the following error..<br>
><br>
> /etc/init.d/xinetd: 75: start-stop-daemon: not found<br>
> /etc/init.d/xinetd: 75: start-stop-daemon: not found<br>
><br>
> I can't figure out why..<br>
><br>
> Can anyone give me any ideas??<br>
<br>
</div>Yes. The environment of a script run by cron is much different of the<br>
environment of a script run from the prompt. Especially, by default,<br>
cron sets<br>
PATH=/usr/bin:/bin<br>
but start-stop-deamon sits in /sbin.<br>
<br>
So, in your script, you'll have to explicitly set PATH the way you need it.<br>
<br>
--<br>
Regards<br>
  mks<br>
<font color="#888888"><br></font></blockquote><div><br></div><div>Great.. Thanks.. I have set the PATH so will see tonight if all goes smoothly.. :)</div></div>