Web Hosting Talk







View Full Version : Keep task running after closing out of session...


dallassmith
05-07-2002, 10:08 PM
How do you keep tasks running after you sign out of you ssh session in Linux redhat 7.2? Anyone know?

Thanks
Aaron

dside443
05-07-2002, 10:17 PM
nohup <insert command here> &

e.g.
nohup ping -t www.yahoo.com &

dallassmith
05-07-2002, 10:40 PM
I did that, and it took forever sayin it was adding it to nohub.out, and it never did it so i Ctrl + C'd it...

-Aaron

dallassmith
05-07-2002, 10:41 PM
*nohup

dside443
05-07-2002, 10:48 PM
Did you use the "&" symbol after it?

dallassmith
05-07-2002, 10:49 PM
ya i sure did

microsol
05-08-2002, 07:24 AM
Install screen. Then you just run screen -d -m filename .
If your connection gets interrupted you just login again and type screen -r to resume the screen. If the screen is detached check the pid and type screen -r pidofthescreen

BMurtagh
05-08-2002, 10:29 AM
just add & to the end, ie for a hl game server:

./hlds_run -game blah -blah -blah &

will start it, then ctrl + d, then close down the ssh window of secure crt or just disconnect, that should work.

kunal
05-08-2002, 05:35 PM
Originally posted by microsol
Install screen. Then you just run screen -d -m filename .
If your connection gets interrupted you just login again and type screen -r to resume the screen. If the screen is detached check the pid and type screen -r pidofthescreen


aaaaaaaaaaah... this is the best post I have read in a while :D

so the command is basically

'screen -d -m filename .'


where filename can be 'installphp'... right? whats the last '.' for?


*can hear yells in his head.. "RTFM!! RTFM!!"* hehe

BMurtagh
05-08-2002, 05:52 PM
the '.' is the end of his sentence.

kunal
05-08-2002, 06:30 PM
Originally posted by LogicBrendan
the '.' is the end of his sentence.


woops.. oh ok :blush:

microsol
05-08-2002, 10:03 PM
Originally posted by kunal



aaaaaaaaaaah... this is the best post I have read in a while :D

so the command is basically

'screen -d -m filename .'


where filename can be 'installphp'... right? whats the last '.' for?


*can hear yells in his head.. "RTFM!! RTFM!!"* hehe

:eek: Hmm, yeah, you never used it, right? :rolleyes: