title: Cronjob is not running Python script on Raspberry
body: <p>On my Raspberry I try to run a Python script as a cronjob. The script does run and execute perfect via the console when I ask him to. However I cannot manage to run the task in cron. Why is this cronjob not working?</p>
  
  <p>What I’ve did so far</p>
  
  <ol>
  <li>Logged in as root user</li>
  <li>Granted all rights at the .py file in the Finder to anybody and chmodded the file to 777</li>
  <li>Edited both sudo crontab -e and crontab -e files and I did edit the /etc/crontab file (they are three different files(?!)). </li>
  <li>Tested crons with each of the below cron codes (I did reboot after every edit).</li>
  <li>Checked the error log /var/log/syslog/ and saw no errors regarding these cron tasks.</li>
  <li>Tested with an output file: >> /home/root/Desktop/pi.log 2>&amp;1. That didn’t provide me output.</li>
  </ol>
  
  <p><strong>cronjob commands</strong></p>
  
  <pre><code>/2 * * * * Python /home/root/Desktop/pi.py
  /2 * * * * /usr/bin/python /home/root/Desktop/pi.py
  /2 * * * * cd /home/root/Desktop/ Python pi.py
  </code></pre>
  
  <p>The Python script is a bit long. The main function is to retreive data from a usb device and store this in an sql database. See full code : <a href="https://github.com/gejanssen/slimmemeter-rpi/blob/master/p1db/p1uitlezerdb-ESMR50.py" rel="nofollow noreferrer">https://github.com/gejanssen/slimmemeter-rpi/blob/master/p1db/p1uitlezerdb-ESMR50.py</a></p>