Hi Guys
I have written a daemon that polls a JMS queue and kicks off jobs using the 'dsjob' command.
It does this and detaches (i.e. it does not use the "-wait" nor the "-jobstatus" flags) - so the job will run in the background.
I now realize that there are going to be times when multiple jobs need to be run, when i try to start one job straight after another using 'dsjob' i get:
"Error running job
Status code = -2 DSJE_BADSTATE"
I have set up the job to be "Multiple Instance" in the Job Properties.
Am I doing something wrong, or is this not possible?
Thanks in advance.
Jon
Running multiple instances using dsjob
Moderators: chulett, rschirm, roy
More specifically, are you aware that you need to include an 'Invocation ID' when starting a multi-instance job to allow more than one instance to run at the same time? This can be pretty much any continuous alphanumeric value, as long as it is unique per run. And you specify it via dsjob by appending it to the MI job name with a dot. For example, in order to run an MI job called 'test', you might:
dsjob test.A
dsjob test.B
dsjob test.C
All three could run at the same time. Of course, there's more to it than that - the jobs must be designed to handle multiple invocations properly as well, but this should get you past this hurdle I assume.
dsjob test.A
dsjob test.B
dsjob test.C
All three could run at the same time. Of course, there's more to it than that - the jobs must be designed to handle multiple invocations properly as well, but this should get you past this hurdle I assume.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
thanks!
ahh, thats excellent news.
i kind of discovered this problem just before i went home and worried about it for the whole bike trip home..
thanks very much for the solution, it'll make the bike ride to work tomorrow much more enjoyable.
i kind of discovered this problem just before i went home and worried about it for the whole bike trip home..
thanks very much for the solution, it'll make the bike ride to work tomorrow much more enjoyable.