The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Script Exection in Background Krrishv Shell Programming and Scripting 4 01-07-2007 09:59 AM
how to run script at background happyv Shell Programming and Scripting 4 09-22-2006 04:39 AM
Cannot submit a background job tansha Shell Programming and Scripting 2 06-20-2006 06:58 AM
Script to submit a job with date parm in maestro Kirojin Shell Programming and Scripting 1 03-21-2006 01:11 PM
Background shell script Moofasa Shell Programming and Scripting 5 05-12-2005 06:23 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 11-07-2003
Registered User
 

Join Date: Jul 2003
Location: Canada
Posts: 10
Unhappy submit a ksh script in background

I submitted a ksh script in the background last night before leaving work:

./ping_test &

When I came into work this morning I discovered that it had stopped running when my session timed out.

So, I then tried it again this morning and logged out before letting it time out as one unix site suggested that. Same result. The script stopped running.

I need this script to run until I manually kill it.

Any ideas? I am using an AIX 4.3.3.

Thanks.
Reply With Quote
Forum Sponsor
  #2  
Old 11-07-2003
Registered User
 

Join Date: Nov 2003
Location: Minnesota
Posts: 388
Not an AIX guy, but I'd guess you just use nohup to tell the script not to die when you logout.

nohup scriptname.ksh &

would do it in Solaris (what I know best).
Reply With Quote
  #3  
Old 11-07-2003
Registered User
 

Join Date: Jul 2003
Location: Canada
Posts: 10
Thanks man. That's it!
Reply With Quote
  #4  
Old 11-07-2003
google's Avatar
Moderator
 

Join Date: Jul 2002
Location: Atlanta
Posts: 740
maybe set the environment variable TMOUT to 0, and use nohup as rhfrommn suggested.

export TMOUT=0
Reply With Quote
  #5  
Old 11-08-2003
s93366's Avatar
Registered User
 

Join Date: Apr 2002
Location: Sweden
Posts: 159
You can also check out a very cool and usefull program called screen.

It lets you start a new shell and then deattach it with ctrl+ad ... then you can logout..

then login again and just use screen -r to resume it..

You will have more control with screen than with nohup. (great for IRC-clients and stuff like that)

/peter
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 07:38 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0