求助,大佬

Web、Mail、Ftp、DNS、Proxy、VPN、Samba、LDAP 等基础网络服务
回复
woshidabendan
帖子: 13
注册时间: 2018-07-11 20:05
系统: ubuntu server 18.04

求助,大佬

#1

帖子 woshidabendan » 2022-01-22 1:29

问题1:我用nohup python3 xxx.py -u >> xxx.log 2>&1 & py里面有一些print语句用来打印结果或者异常的,想让这个py脚本一直在后台跑,但是为什么 xxx.log里面只有nohup: ignoring input别的print都没有呢?
问题2: 能不能用一行命令启动多个后台脚本比如:nohup python3 1.py & && nohup python3 2.py 这种写法报错 用;也不行。
头像
astolia
论坛版主
帖子: 6541
注册时间: 2008-09-18 13:11

Re: 求助,大佬

#2

帖子 astolia » 2022-01-22 11:36

1、检查代码中有没有输出重定向的操作,或者程序没有走到输出那步
2、干嘛非要挤在一行里?( nohup python3 1.py & ) && ( nohup python3 2.py & )
回复