Results 1 to 5 of 5
I've created a script which does some monitoring and sends e-mails when various conditions are met. Trouble is it only seems to work while I am logged on - if ...
- 12-06-2007 #1
Make script run while user is not logged on
I've created a script which does some monitoring and sends e-mails when various conditions are met. Trouble is it only seems to work while I am logged on - if I start it using "./script &" and then log off - it stops working. I also tried launching it using "nohup ./script &" ... same thing happens. I feel I am missing an easy trick here. What am I doing wrong?
Registered Linux user #389109
My Semi-Linux Blog
- 12-06-2007 #2
you could use screen to do this pretty easily, i forget the arguments to it, but its pretty easy you basically create a new "screen" in the terminal and then you can execute your script, then "detach" the screen and it will keep running in the background, you can also reopen that screen and cancel execution if you want
- 12-06-2007 #3Linux Enthusiast
- Join Date
- Aug 2006
- Location
- Portsmouth, UK
- Posts
- 539
screen

Awesome tool, yet so many people haven't come across it!RHCE #100-015-395
Please don't PM me with questions as no reply may offend, that's what the forums are for.
- 12-07-2007 #4
Yep screen seems to do the trick, many thanks!
Registered Linux user #389109
My Semi-Linux Blog
- 12-08-2007 #5Linux Engineer
- Join Date
- Feb 2005
- Posts
- 1,044
nohup was invented for just this situation. man nohup for details.


Reply With Quote