Cannot run multiple instances of a job
Posted: Thu Mar 04, 2004 10:27 am
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 ??
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 ??