LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-14-2005, 01:57 AM   #1
stefaandk
Member
 
Registered: Jun 2005
Distribution: Centos
Posts: 215

Rep: Reputation: 30
Keeping Linux job running


I seem to be having a problem keeping a job running after I logout,

I use the following command, testing it with top

nohup top &

When I close my (SSH) connection the job has also died.

I've also read this guide and I think I'm doing things right.

http://www.physics.ubc.ca/mbelab/com...culations.html

Ta,
 
Old 06-14-2005, 08:30 AM   #2
Blinker_Fluid
Member
 
Registered: Jul 2003
Location: Clinging to my guns and religion.
Posts: 683

Rep: Reputation: 63
Top probably isn't the best because it depends on a terminal to output to unless you are redirecting to a file using one of the batch options.

Another option is the 'at' command.
example on how to use it:

'at now' tells it to run immeditately it will come up with an 'at>' prompt put in whatever command you want to run and when done hit ctrl+D
 
Old 06-14-2005, 09:18 AM   #3
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,890

Rep: Reputation: 1608Reputation: 1608Reputation: 1608Reputation: 1608Reputation: 1608Reputation: 1608Reputation: 1608Reputation: 1608Reputation: 1608Reputation: 1608Reputation: 1608
Use the screen command.
Code:
man screen
for details or take a look at this tutorial.

Regards
 
Old 06-14-2005, 09:37 AM   #4
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 235Reputation: 235Reputation: 235
Running by sending to the background should work but it might be terminating cause you are logging totally out. Use screen though, more powerful.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Keeping a program running between SSH sessions ark86 Linux - Newbie 2 10-01-2005 04:31 PM
Keeping a process running after shell logout abboq Linux - Software 5 09-01-2004 06:58 PM
keeping logs from a cron job dominant Linux - Newbie 2 03-02-2004 12:37 PM
Keeping a process running after disconnect steyr Linux - General 2 02-25-2004 07:03 AM
Cron Job Not Running pzorn Linux - General 4 10-02-2003 02:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration