【发布时间】:2017-01-12 02:27:39
【问题描述】:
我无法让 crontab 使用 django-archive 执行站点备份。
crontab 文件:
0 5 * * * python ~/SBGBook/gbsite/manage.py archive
错误:
Traceback (most recent call last):
File "/home/jgates/SBGBook/gbsite/manage.py", line 17, in <module>
"Couldn't import Django. Are you sure it's installed and "
ImportError: Couldn't import Django. Are you sure it's installed and available $
如果我在gbsite/ 目录中,python manage.py archive 命令效果很好,但我猜这里存在某种路径问题。这一切都在生产服务器上的 venv 中运行。
【问题讨论】:
标签: python django crontab dev-to-production