Redian新闻
>
how to run background process after logout
avatar
how to run background process after logout# Unix - 噫吁兮,危乎高哉
f*e
1
I can keep the background process running after exit the terminal. But when I
logout, the process will be killed automatically, though I have used the
"nohup"
command. Who could please tell me how I can keep the process running after I
logout? Since it takes a long time to run my code, I need this function very
much.
Thank you.
ps: the shell I use is tcsh. I tried other shell but have the same result.
avatar
kb
2
maybe crontab will work?
avatar
s*s
3
sleep xxxx;run_script &

【在 kb 的大作中提到】
: maybe crontab will work?
avatar
p*g
4
Learn to use GNU screen which is fantastic to keep a process running for a
long time
screen -S TITLE # start with session named TITLE from a terminal, you then
can run your command inside it and don't even have to append & to run it in
background
type Ctrl-a d to detach from the session or simply close your terminal.
the screen and processes inside it are still running
screen -rd TITLE # to re-attach to the session
man screen for more info.

when I
I
very

【在 f***e 的大作中提到】
: I can keep the background process running after exit the terminal. But when I
: logout, the process will be killed automatically, though I have used the
: "nohup"
: command. Who could please tell me how I can keep the process running after I
: logout? Since it takes a long time to run my code, I need this function very
: much.
: Thank you.
: ps: the shell I use is tcsh. I tried other shell but have the same result.

avatar
t*s
5
nohup command &
do you have an & at the end?

when I
I
very

【在 f***e 的大作中提到】
: I can keep the background process running after exit the terminal. But when I
: logout, the process will be killed automatically, though I have used the
: "nohup"
: command. Who could please tell me how I can keep the process running after I
: logout? Since it takes a long time to run my code, I need this function very
: much.
: Thank you.
: ps: the shell I use is tcsh. I tried other shell but have the same result.

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。