Hi everyone,
I absolutely cannot figure out how to run multiple instances of a job.
What I actually need to do is more complex than this example but for the sake of argument I made the simplest possible job I could think of and run multiple instances of it.
Here's what I did :
Created a job that reads lines from a file and copies it to another. That's it, it does nothing else and it works fine.
I obviously selected "allow multiple instance" in the job properties.
The input and output filenames are passed as parameters.
Now what I want to do is simultaneously run two instances of this job to work on totally different files.
I have a script that starts those jobs as follow :
dsjob -run -param p1="i1" -param p2="o1" myProject TEST_MULT &
dsjob -run -param p1="i2" -param p2="o2" myProject TEST_MULT &
In theory what this should do is the first job should read from i1 and write to o1 and the second job should read from i2 and write to o2.
It works fine when I run them sequentially but when I run them at the same time, I either get "Status code = -2 DSJE_BADSTATE" or "Status code = -10 DSJE_JOBLOCKED"
Is something misconfigured, is this a bug, or am I misunderstanding what "multiple instances" should do ??
Cannot run multiple instances of a job
Moderators: chulett, rschirm, roy
Re: Cannot run multiple instances of a job
You can't just simply start the same jobs multiple times. You need to start the job and specify a different Invocation ID for each run - this is what allows them to run simultaneously. For example:sdupre wrote:Is something misconfigured, is this a bug, or am I misunderstanding what "multiple instances" should do ??
Code: Select all
dsjob -run -param p1="i1" -param p2="o1" myProject TEST_MULT.o1
dsjob -run -param p1="i2" -param p2="o2" myProject TEST_MULT.o2
FYI - There's no need to run these commands in the background. If you do not specify the -wait option then it will not wait for the job to finish before moving on to the next command.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Go to your Start button and descend to the Ascential client software folder and then go to Online Documentation. Everything you could ever need is there.
Kenneth Bland
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle