我想在远程Ubuntu (AWS)上运行一个脚本。
while true; do timeout 1h python worker.py --log-level=ERROR; done效果很好,但是当我添加nohup时
nohup while true; do timeout 1h python worker.py --log-level=ERROR; done &它返回错误-bash: syntax error near unexpected token 'do'。
什么是正确的语法?
发布于 2016-08-27 11:12:30
试一试
nohup bash -c 'while true; do timeout 1h python worker.py --log-level=ERROR; done'https://stackoverflow.com/questions/39180423
复制相似问题