作者:张骞在这里 | 来源:互联网 | 2023-05-18 17:39
WhenIexecutemycronmanuallyeverythingseemstowork.Howeverwhenitrunsbycronitseemstor
When I execute my cron manually everything seems to work. However when it runs by cron it seems to run twice. In my deployment script I have the following two lines to add my crons:
当我手动执行我的cron时,一切似乎都有效。但是当它由cron运行时,它似乎运行了两次。在我的部署脚本中,我有以下两行来添加我的crons:
/usr/bin/crontab -l | { /bin/cat; /bin/echo "* 3 * * * /etc/app/execute.py"; } | /usr/bin/crontab -
/usr/bin/crontab -l | { /bin/cat; /bin/echo "* 0,2,4,6,8,10,12,14,16,18,20,22 * * * /etc/app/solr.py"; } | /usr/bin/crontab -
Is there any reasonable reason why my CRON might be running twice on my debian server? I have no idea what might be causing this or how to debug it so any help would be much appreciated.
我的CRON可能在我的debian服务器上运行两次有什么合理的理由吗?我不知道是什么导致这个或如何调试它所以任何帮助将非常感激。
In my Crontab I have this:
在我的Crontab中我有这个:
* 3 * * * /etc/app/execute.py
* 0,2,4,6,8,10,12,14,16,18,20,22 * * * /etc/app/solr.py
1 个解决方案