07-22-2005
killing unix job after the job process completes
Hi,
Thanks in advance.
i need to kill a unix background running job after that job process completes.
i can kill a job by giving the following unix command
kill -9 processid
how to kill the job after the current process run gets completed ?
Appreciate your valuable help.
Thanks - Alo
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi!
I'm using a script to start a process that might run forever if some parameters are given wrong (it's part of an optimization). I would now like to have the process killed after a certain walltime in that case. So far I get it done with the following lines
./My_process.e &
pid=`ps -ef |... (3 Replies)
Discussion started by: ciwstevie
3 Replies
2. Solaris
Hi,
Thanks in advance.
i need to kill a unix background running job after that job process completes.
i can kill a job by giving the following unix command
kill -9 processid
how to kill the job after the current process run gets completed ?
Appreciate your valuable help.
Thanks... (7 Replies)
Discussion started by: dtazv
7 Replies
3. UNIX for Dummies Questions & Answers
I have this box job and it contains only one job under it which is to load a file. I want to insert a "File Watcher", "Copy File" to it? Have no clue how to do that...any help plzzz... (4 Replies)
Discussion started by: xejatt
4 Replies
4. Shell Programming and Scripting
Hi Experts,
I need a script advice to schedule 12 jobs ( SAS Codes execute back ground ).
Algorithem:
1. Script checks first job.
2. Finds first job is done; invoke second job.
3. finds second job is done; invoke third job.
..
Request you to please assist. (3 Replies)
Discussion started by: Jerald Nathan
3 Replies
5. Shell Programming and Scripting
I had issues with processes locking up. This script checks for processes and kills them if they are older than a certain time.
Its uses some functions you'll need to define or remove, like slog() which I use for logging, and is_running() which checks if this script is already running so you can... (0 Replies)
Discussion started by: sukerman
0 Replies
6. Shell Programming and Scripting
We need to configure autosys that when a job fails continously for 3 times, we need to call another job.
Is this possible in Autosys, or can anyone advice on the alternative. (2 Replies)
Discussion started by: sangea
2 Replies
7. UNIX for Dummies Questions & Answers
Hello all,
I need to write a shell script that does the following; Allows you to kill a job,(1) listing only the jobs you own, (2) asks for which job to kill, (3) kills the job and (4) confirms kill...
I am not sure if I need to first run the job command and pipe it with kill? Which options... (6 Replies)
Discussion started by: citizencro
6 Replies
8. UNIX for Advanced & Expert Users
Hi,
I have one autosys job that will retrieve the proccess id's and will kill those processess as follows,
pid=`/usr/ucb/ps -auwwxx | grep MAIN |nawk '{print $2}'`
kill -9 pid
but after executing this particular job, its status is showing as TE(terminated) and the kill process is... (3 Replies)
Discussion started by: Kattoor
3 Replies
9. Shell Programming and Scripting
Hi,
I am using net::ftp for transferring files now i am trying in the same Linux server as a result ftp is very fast but if the server is other location (remote) then the file transferred will be time consuming.
So i want try putting FTP part as a background process. I am unaware how to do... (5 Replies)
Discussion started by: vanitham
5 Replies
10. Shell Programming and Scripting
Hi,
How can I write a cron job that runs the MySQL "show processlist" command and stores in log file every 5 seconds between 5 am to 7 am?
I know the lowest possible timing I can have in cron is a minute not second. If I need a script, I am looking for a solution in Bash.
I think this cron... (2 Replies)
Discussion started by: riomario
2 Replies
KILL(1) General Commands Manual KILL(1)
NAME
kill - terminate a process with extreme prejudice
SYNOPSIS
kill [ -sig ] processid ...
kill -l
DESCRIPTION
Kill sends the TERM (terminate, 15) signal to the specified processes. If a signal name or number preceded by `-' is given as first argu-
ment, that signal is sent instead of terminate (see sigvec(2)). The signal names are listed by `kill -l', and are as given in
/usr/include/signal.h, stripped of the common SIG prefix.
The terminate signal will kill processes that do not catch the signal; `kill -9 ...' is a sure kill, as the KILL (9) signal cannot be
caught. By convention, if process number 0 is specified, all members in the process group (i.e. processes resulting from the current
login) are signaled (but beware: this works only if you use sh(1); not if you use csh(1).) Negative process numbers also have special
meanings; see kill(2) for details.
The killed processes must belong to the current user unless he is the super-user.
The process number of an asynchronous process started with `&' is reported by the shell. Process numbers can also be found by using ps(1).
Kill is a built-in to csh(1); it allows job specifiers of the form ``%...'' as arguments so process id's are not as often used as kill
arguments. See csh(1) for details.
SEE ALSO
csh(1), ps(1), kill(2), sigvec(2)
BUGS
A replacement for ``kill 0'' for csh(1) users should be provided.
4th Berkeley Distribution April 20, 1986 KILL(1)