Django archive via crontab in production
<p>I'm having trouble getting crontab to execute a site backup, using django-archive.</p>

<p>crontab file:</p>

<pre><code>0 5 * * * python ~/SBGBook/gbsite/manage.py archive
</code></pre>

<p>Error:</p>

<pre><code> Traceback (most recent call last):
     File "/home/jgates/SBGBook/gbsite/manage.py", line 17, in &lt;module&gt;
       "Couldn't import Django. Are you sure it's installed and "
    ImportError: Couldn't import Django. Are you sure it's installed and available $
</code></pre>

<p>The <code>python manage.py archive</code> command works great if I'm in the <code>gbsite/</code> directory, but there's some sort of path issue here, I'm guessing. This is all running in a venv on a production server. </p>

<p>Try to use the python interpreter from your virtualenv :</p>

<pre><code>0 5 * * * /path/to/virtualenv/bin/python ~/SBGBook/gbsite/manage.py archive
</code></pre>

python django crontab dev-to-production