title: Crontab doesn't start my daemon
body: <p>I have a Debian server and I made a daemon and it works fine.</p>
  
  <p>Sometimes this daemon is killed and I made a script to control if daemon is alive or dead. If the script detect that daemon is died then the script will start it.</p>
  
  <p>If I execute my script works fine but if the script is executed by cron then my daemon doesn't start.</p>
  
  <p><strong>my_script.sh</strong></p>
  
  <pre><code> #!/bin/bash
  
   if ps ax | grep -v grep | grep my_daemon &gt; /dev/null then
       echo "My Daemon is running " 
   else
       echo "My Daemon is died"
       /etc/init.d/mydaemon start 
   fi
  </code></pre>
  
  <p><strong>crontab line</strong></p>
  
  <pre><code>## Check my daemon
  */5 * * * *    /etc/script_folder/my_script.sh &gt; /dev/null 
  </code></pre>
  
  <p>Could be a permissions problem? Can the cron start daemons?</p>
  
  <p>Thanks.</p>