title: Can't get Crontab to work
body: <p>I've been trying to get crontab to work for a while but it doesnt seem to want to work. The python script I need to initialise every midnight works perfectly from the command terminal. The location of my python script is: </p>
  
  <blockquote>
    <p>/home/rv/ncbi-blast-2.2.23+/database_backup/backup.py</p>
  </blockquote>
  
  <p>My contab looks like this:</p>
  
  <pre><code>SHELL=/bin/bash
  PATH=/sbin:/bin:/usr/sbin:/usr/bin:/home/rv/ncbi-blast-2.2.23+/database_backup
  MAILTO=root
  HOME=/
  # For details see man 4 crontabs
  
  # Example of job definition:
  # .---------------- minute (0 - 59)
  # |  .------------- hour (0 - 23)
  # |  |  .---------- day of month (1 - 31)
  # |  |  |  .------- month (1 - 12) OR jan,feb,mar,apr ...
  # |  |  |  |  .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
  # |  |  |  |  |
  # *  *  *  *  *  command to be executed
  0 0 * * * /usr/bin/python /home/rv/ncbi-blast-2.2.23+/database_backup/backup.py
  </code></pre>
  
  <p>My python script looks like the following:</p>
  
  <pre><code>#!/usr/bin/python
  
  from subprocess import Popen
  import datetime
  
  today = datetime.date.today()
  
  today = str(today)
  
  #print today
  
  f = open("/home/rv/ncbi-blast-2.2.23+/database_backup/%s.sql" % (today), "w")
  x =  Popen(["mysqldump", "-u", "root", "-p*****", "normalisation"], stdout = f)
  x.wait()
  f.close()
  </code></pre>
  
  <p>Any idea where im going wrong?</p>
  
  <hr>
  
  <p>Just looked at the cron logs and i got this for each time entry I tried </p>
  
  <pre><code>(root) BAD FILE MODE (/etc/crontab)
  </code></pre>
  
  <p>I got the same error when i tried with a shell script aswell</p>