我无法让 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 $
python manage.py archive
如果我在目录中,该命令效果很好gbsite/
,但我猜这里存在某种路径问题。这一切都在生产服务器上的 venv 中运行。