kill a process initiated by crontab


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting kill a process initiated by crontab
# 1  
Old 10-14-2008
Question kill a process initiated by crontab

Hi,
I scheduled one script through crontab command and seems like it is hanging. I come to know this through the command 'ps -ef' whcih is showing me the program running, but no chances of it to take more than 2hrs to comlpete.

I want to kill that process. I tried to kill it using the command 'kill PID'. PID(listed in the command ps -ef), but it is saying that, No such process....

Can anybody suggest how to kill a process initiated from crontab? The process is running under uid related to my login(that was the command ps -ef showing).

Your help is appreciated!

Regards
Dileep
# 2  
Old 10-14-2008
Is that showing as a defunct process ? You won't be able to kill a zombie as thats not a process
# 3  
Old 10-14-2008
hi,

try the process..hope it will help you.

Kill -9 PID

subhendu
# 4  
Old 10-14-2008
Quote:
Originally Posted by subhendu81
hi,

try the process..hope it will help you.

Kill -9 PID

subhendu
issuing kill to the pid says "no such process" as said by the OP

so kill with -9 wont help really
# 5  
Old 10-14-2008
Quote:
Originally Posted by matrixmadhan
issuing kill to the pid says "no such process" as said by the OP

so kill with -9 wont help really
yes, am also getting the same message while trying kill PID.
But sometimes it is successful. I think the issue is with the interdependency between the parent and child process.

Because my actual process is a perl script which inturn will call other perl script through backquotes operator. So may be i tried to kill the parent when the child is running!

Am not sure, is there any interdependency like that will matter?

Regards
Dileep
# 6  
Old 10-15-2008
There is no dependency between child and parent with respect to killing the process. When a child process is killed SIGCHLD would be delivered to the parent indicating that one of the child(s) is terminated and its an mechanism by which parent knows whether to wait for any of the child process to exit.
# 7  
Old 10-16-2008
Java

oh! ok, thanks for that information.So am not sure whats happenend in my scenario.

What about the reverse process? ie, terminating the parent while one or two child processes are running?

Will it automatically terminate the child process?

Regards
Dileep
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. 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

2. UNIX for Dummies Questions & Answers

Kill Duplicated Process by shell in crontab

Hi! I need your help, please. I'm in AIX node and sometimes listener process from an oracle instance gets duplicated, i mean that it get spawned a second listener process. As we can't apply changes to the databases on this months, i want to build a shell that can identify the second... (6 Replies)
Discussion started by: Pactows
6 Replies

3. Shell Programming and Scripting

Shell Script to Kill Process(number of process) Unix/Solaris

Hi Experts, we do have a shell script for Unix Solaris, which will kill all the process manullay, it used to work in my previous env, but now it is throwing this error.. could some one please help me to resolve it This is how we execute the script (and this is the requirement) ... (2 Replies)
Discussion started by: jonnyvic
2 Replies

4. UNIX for Dummies Questions & Answers

crontab or looping script to Kill process from user

I am looking for a way to kill 2 processes from a user through some kind of script. Using an oracle script, I get two process ids that need to be killed. SQL> select ssn.process as client_process_id, pcs.spid as oracle_process_id, ssn.sid, ssn.serial# 2 from v$session ssn inner join... (5 Replies)
Discussion started by: Meert
5 Replies

5. Shell Programming and Scripting

how to kill a process initiated by other user at the same group

Hey I'm writing a script that creates some processes,and some scripts which kill those processes. the question is Simply: How can I allow a group members to be able to kill (using kill command) processes created by other user at the same group? and i need the change to be at the script... (5 Replies)
Discussion started by: The Dark Knight
5 Replies

6. Linux

Kill a process without using kill command

I want to Kill a process without using kill command as i don't have privileges to kill the process. I know the pid and i am using Linux 2.6.9 OS. (6 Replies)
Discussion started by: sudhamacs
6 Replies

7. Shell Programming and Scripting

Kill a process without using kill command

Sorry, posted the question in other forum. (0 Replies)
Discussion started by: sudhamacs
0 Replies

8. Programming

kill(0,-9) don't kill the process

Hi all i have simple c program , when i wish to kill the app im using kill(0,-9) , but it seams this command don't do any thing and the program. just ignore it . what im doing wrong here ? im using HP-UX ia64 Thanks (9 Replies)
Discussion started by: umen
9 Replies

9. Shell Programming and Scripting

how to start a process and make it sleep for 5 mins and then kill that process

how to start a process and make it sleep for 5 mins and then kill that process (6 Replies)
Discussion started by: shrao
6 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