how to kill process while keeping the submitted job running


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers how to kill process while keeping the submitted job running
# 1  
Old 05-31-2002
Question how to kill process while keeping the submitted job running

Smilie

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!
# 2  
Old 05-31-2002
Launch your job with : & at the end of the line.
For example :

/opt/job1 &
# 3  
Old 06-01-2002
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
# 4  
Old 06-02-2002
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! Smilie
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Idle command to kill the process running n unx box machine

Hi Team , I have one process named as cec_analysiseool that is running on unix box machine now i want to kill this process so please advise what will be the ideal command to kill this , what i have tried is :confused: kill -9 `ps -ef | grep cec_analysiseool | grep -v grep | awk '{print $2}'` (2 Replies)
Discussion started by: unclesamm
2 Replies

2. Shell Programming and Scripting

Command to know all the Current running process and how to kill

All, 1.What is the unix comand used for all current running process (Including All current running processes Parent ->child->subchild process) 2.If child and subchild processes are running then what is the unix command to kill parent and its all child subchild processes in UNIX. Kindly... (7 Replies)
Discussion started by: skp
7 Replies

3. Shell Programming and Scripting

Script to kill a process running at a certain port

Hello, I have multiple scripts (vlc1, vlc2,...vlc5) and as I do not know how to run them as upstart processes, I entered my script links into rc.local file. Here is the sample one for process vlc1: $ nano /etc/rc.local added below line into rc.local /var/bin/./vlc1 & Port nr of vlc1... (7 Replies)
Discussion started by: baris35
7 Replies

4. Shell Programming and Scripting

Help with kill a specific process after certain running time

Hi, Do anybody experience to write a bash script in order to kill a specific process (java) after certain time of running? eg. java java.jar task_run.txt I will run a java program (java.jar) which will run a long list of process (task_run.txt) one by one. I plan to terminate the java... (5 Replies)
Discussion started by: perl_beginner
5 Replies

5. Shell Programming and Scripting

Kill an specific process ID using the KILL and GREP commands

Good afternoon I need to KILL a process in a single command sentence, for example: kill -9 `ps -aef | grep 'CAL255.4ge' | grep -v grep | awk '{print $2}'` That sentence Kills the process ID corresponding to the program CAL255.4ge. However it is possible that the same program... (6 Replies)
Discussion started by: enriquegm82
6 Replies

6. Shell Programming and Scripting

Cron job and shell script to kill a process if memory gets to high

Hello, I'd like to set a cron job that runs a shell script every 30 minutes or so to restart a java based service if the memory gets above 80%. Any advice on how to do this? Thanks in advance! - Ryan (19 Replies)
Discussion started by: prometheon123
19 Replies

7. Shell Programming and Scripting

Find and delete files before a job is submitted to queue

Hello all. I need some help modifying the following script: #!/bin/bash #PBS -l nodes=1:ppn=8,walltime=48:00:00,os=centos53computeA ## To submit type: qsub x.sh # If not an interactive job (i.e. -I), then cd into the directory where # I typed qsub. if ; then if ; then cd... (3 Replies)
Discussion started by: marcozd
3 Replies

8. Shell Programming and Scripting

keeping 10 process running at the same time

Hi guys, I neet to run sqlldr to charge about 50,000 files every day to my DWH, so I need to make an script to keep about 100 processes of sqlldr running at the same time. So, the issue is that i've been trying for a few days to make an script which can keep that amount of processes running, so... (2 Replies)
Discussion started by: razziel
2 Replies

9. UNIX for Dummies Questions & Answers

See if process is running and kill it

I need a simple line to run from apple remote desktop's Unix terminal on multiple different machines to see if Microsoft Entourage is running and kill it.. I imagine this could be done with a ps auxwww and grab the second field, (PID) put it into a variable and do a kill $variable using awk, but... (5 Replies)
Discussion started by: glev2005
5 Replies

10. UNIX for Advanced & Expert Users

When kill doesnt work, how to kill a process ?

Hi All, I am unable to kill a process using kill command. I am using HP-UX system. I have tried with kill -9 and i have root privilages. How can i terminate this daemon ? ? ? Regards, Vijay Hegde (3 Replies)
Discussion started by: VijayHegde
3 Replies
Login or Register to Ask a Question