title: Root cronjob does not run correctly, user cronjob does
body: <p>I am trying to run a root cronjob for executing a script.</p>
  
  <p>Here's the cronjob I put into <code>sudo crontab -e</code>:</p>
  
  <pre><code>*/1 * * * * ~/temperature_log/logtemp.sh &gt;&gt; ~/temperature_log/templog.log&gt;&amp;1
  </code></pre>
  
  <p>The script requires root permission for <code>hddtemp</code>.
  Unfortunately, the <code>templog.log</code> file never appears. The syslog says:</p>
  
  <pre><code>Jun  6 13:09:01 user CRON[32433]: (root) CMD (~/temperature_log/logtemp.sh &gt;&gt; ~/temperature_log/templog.log&gt;&amp;1)
  Jun  6 13:09:01 user CRON[32426]: (CRON) info (No MTA installed, discarding output)
  </code></pre>
  
  <p>So apparently, the script IS run, but something goes wrong from there.</p>
  
  <p>Even stranger: If I run a user cron via just <code>crontab -e</code>, the script executes (without root permissions, though, so it is of no use for me) and does write the log file.</p>
  
  <p>How can I make sure that my root crontab works correctly?</p>
  
  <p>I am connecting to this computer via ssh as a user without root permissions, but I do have the root passwort.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I changed the program now, I want it to log to syslog via <code>logger</code>. Again, running the script manually works and it logs correctly, but running it from crontab just shows this:</p>
  
  <p><code>Jun  6 14:27:01 user CRON[1657]: (root) CMD (Jun  6 15:06:01 insystems CRON[25328]: (root) CMD (/bin/sh ~/temperature_log/logtemp.sh)</code></p>
  
  <p>No information is logged. I added the /dev/null part to get rid of the email warning. I am not planning on installing an email service.</p>