The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
script to monitor process running on server and posting a mail if any process is dead pradeepmacha Shell Programming and Scripting 12 10-17-2008 12:08 AM
kill(0,-9) don't kill the process umen High Level Programming 9 06-19-2007 03:09 AM
how to start a process and make it sleep for 5 mins and then kill that process shrao Shell Programming and Scripting 6 03-27-2007 09:54 AM
When kill doesnt work, how to kill a process ? VijayHegde UNIX for Advanced & Expert Users 3 05-12-2006 01:24 PM
Kill Processes Running On a Particular Port mahatma UNIX for Advanced & Expert Users 7 03-20-2006 04:50 AM

Closed Thread
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 05-31-2002
Registered User
 

Join Date: Nov 2001
Location: Hong Kong
Posts: 3
Question how to kill process while keeping the submitted job running



I have a process which was schedule to run from 8am - 6pm daily. The scripts will search & run the commands that i was predefined in the database. Ususally, there were about 6-7 jobs for each submission and each job takes about 1-2 hrs and running one by one. And, I have a cron job which will control the process's start and end time. However, when it is time to stop the process, my process will be killed instantly and so does the running jobs. And when the process starts again the next day, the job will run again.

I would like to know if there is any way that I can at least keep my running job processing until it finished even my process has been killed? Thank you very much!
__________________
Thanks for helping hk_newbie!
Forum Sponsor
  #2  
Old 05-31-2002
annececile's Avatar
Registered User
 

Join Date: Nov 2001
Location: Paris, France
Posts: 42
Launch your job with : & at the end of the line.
For example :

/opt/job1 &
  #3  
Old 05-31-2002
linuxpenguin's Avatar
Registered User
 

Join Date: May 2002
Location: India
Posts: 295
Re: how to kill process while keeping the submitted job running

Hi,

What i interpret from your situation is that you have process A and processess B, C, D running as a result of process A i.e. process A initiates B, C, D. Now when process A is killed you want the processes B, C, D still running. Correct me if i have wrongly interpreted.

Well the solution to this is wherever you have the entry point to the processes B,C,D just start them with the word 'nohup' which means "no hang up". so that B, C, D, the children of A keep running to completion even if the process A dies.

I hope i have clarified ur problem

rgd
penguin
__________________
War doesnt determine who is right, it determines who is left
  #4  
Old 06-02-2002
Registered User
 

Join Date: Nov 2001
Location: Hong Kong
Posts: 3
hi, linuxpenguin

yup, you are right, I've got what i expected using the 'nohup' in front the command, thank you very much for your help!
__________________
Thanks for helping hk_newbie!
Google The UNIX and Linux Forums
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 08:07 PM.


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