简体   繁体   English

django 运行服务器无法从 crontab 脚本运行

[英]django run server is not working from crontab script

I m writing my cronjob as below:我正在编写我的 cronjob,如下所示:

*/5 * * * * /bin/bash /root/gitsync.sh

and content of gitsync.sh is as below: gitsync.sh 的内容如下:

#!/bin/bash

cd /root/devices-web

git checkout main

git pull

echo "log1" >> /root/log.txt

pip install -r requirements.txt

python manage.py runserver 0.0.0.0:8000

Script is getting called every 5 minutes, but services are not running.每 5 分钟调用一次脚本,但服务未运行。

Is this a problem with the script or the runserver?这是脚本或运行服务器的问题吗? What do you mean by 'services not running'? “服务未运行”是什么意思?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM