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
CASS Job killed when session logs out
-
- Participant
- Posts: 82
- Joined: Wed Jul 14, 2004 7:21 am
- Location: India
CASS Job killed when session logs out
Integrity is what you do when no one is watching
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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 &
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 82
- Joined: Wed Jul 14, 2004 7:21 am
- Location: India
Hi Ray,
My script is called using nohup and has a trailing ampersand; thats what the problem is. I call my script using:
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
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 &
Regards,
Vinod
Integrity is what you do when no one is watching
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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.
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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.