当我通过专用服务器上的终端运行此脚本时,它将起作用。但是仅在窗口打开时(终端)。当我关闭窗口时,它关闭了运行脚本。我如何使其在后台永远运行?
#!/bin/bash ./robots.sh & ./update_robots.sh & ./update_auctions_end.sh & ./auto_bidders.sh
您将需要使用“ nohup”命令来执行以下操作:
nohup ./robots.sh > /dev/null 2>&1 &
希望这对您有帮助。
您可以在此处查看nohup的完整详细信息:http : //linux.die.net/man/1/nohup
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句