No. Either only run the script once the job has completed or make a -jobinfo loop inside the script until it tells you the job is complete then pull the log records.peep wrote:Can i use -run -wait parameters?
shell script to call job logs showing the current job
Moderators: chulett, rschirm, roy
Re: shell script to call job logs showing the current job
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
I said a -jobinfo loop. Meaning, in an iterative fashion make a normal dsjob -jobinfo function call until the results say that the job has finished. So a "while" or "do" loop much like you've already posted but just checking the status of the job. Once it has finished, do the call to get the -logdetail information.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Premium Member
- Posts: 1044
- Joined: Wed Sep 29, 2004 3:30 am
- Location: Nottingham, UK
- Contact:
Our shell scripts run the job with -wait and then once the dsjob command finishes the shell script then interrogates the log with another dsjob command. Are your jobs being run from a shell script like this, or does your log interrogation have to be done outside of the process that actually runs the job? An all-in-one script that runs and then retrieves the log would be neater.
Phil Hibbs | Capgemini
Technical Consultant
Technical Consultant