一般来说,我对亚硝酸盐和编程还是比较陌生的。但是,我想看看为什么我的crontab作业没有在Nitrous.io上做任何事情。
我正在使用virtualenv,因此可以在crontab上运行它们。这是我的cronline:
10 6,19 * * * /home/action/susteq/bin/activate /home/action/susteq/start.py 2>&1 >> /home/action/susteq/log/start.log
只要您主动登录到该框(或使用tmux)并且该框不会因不活动而关闭,Crontab就可以在Nitrous.IO上运行。付费框将无限期运行。
查看此命令,您可能想要确保它在crontab之外按预期运行。尝试先运行该过程:
$ /home/action/susteq/bin/activate /home/action/susteq/http://start.py 2>&1 >> /home/action/susteq/log/start.log
如果不是,那么您实际上可能想尝试将其放置2>%1
在行的末尾(在此重定向教程中进一步说明)。以下命令可能是您要查找的内容:
$ /home/action/susteq/bin/activate /home/action/susteq/start.py >> /home/action/susteq/log/start.log 2>&1
如果可行,请尝试将其添加到您的crontab中:
$ 10 6,19 * * * /home/action/susteq/bin/activate /home/action/susteq/start.py >> /home/action/susteq/log/start.log 2>&1
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句