Page 1 of 1

CASS Job killed when session logs out

Posted: Sun Aug 07, 2005 11:05 pm
by vinodlakshmanan
I have a QS CASS job which is called by a script running in the background (i.e, the UNIX script is running in the background and this script calls the QS job script). However when I kill the session with which the UNIX script is called, the QS job is killed even though the script is running in the background. How do I call the QS script (besides scheduling it) without it being killed when I shutdown for the day? Does it have something to do with the QS deployment?

Regards,
Vinod

Posted: Mon Aug 08, 2005 12:13 am
by ray.wurlod
Use nohup - this is the UNIX method for starting a background process that does not "hang up" (= log out) when its parent logs out. You still need the final ampersand to start the process as a background process.

Code: Select all

nohup command &

Posted: Mon Aug 08, 2005 12:40 am
by vinodlakshmanan
Hi Ray,
My script is called using nohup and has a trailing ampersand; thats what the problem is. I call my script using:

Code: Select all

 nohup myscript & 
This script calls the QS CASS job script and if I kill "myscript" which is running in the background by closing my console, the QS job terminates automatically.

Regards,
Vinod

Posted: Mon Aug 08, 2005 5:55 pm
by ray.wurlod
The whole point of nohup is that, if you close the parent, then myscript should be able to continue executing.

Maybe you can create a shell script from which to execute nohup; then closing the console might knock out your shell script, but not its forked nohup process.

Otherwise, there's something odd about how nohup seems to be implemented at your place.