Abort the Sequence as soon as job logs 1 warning
Moderators: chulett, rschirm, roy
Abort the Sequence as soon as job logs 1 warning
Hi All,
I have 5 jobs running through the Sequence , one after the other.
I would like the Sequence to abort as soon as JOB1 logs 1 warning message (MetaData mismatch error/Data truncation error).
How should I do this in Sequence?
I have done this in JobControl by using DSSetJobLimit & DSGetJobInfo functions, very easily.
I would like to do the same in the Sequence. How would i do that?
Thanks in Advance.
I have 5 jobs running through the Sequence , one after the other.
I would like the Sequence to abort as soon as JOB1 logs 1 warning message (MetaData mismatch error/Data truncation error).
How should I do this in Sequence?
I have done this in JobControl by using DSSetJobLimit & DSGetJobInfo functions, very easily.
I would like to do the same in the Sequence. How would i do that?
Thanks in Advance.
kris007 wrote:IMO it's not possible to abort the sequence as soon as any Job logs the first warning message. You can abort the sequence when any job finishes with warnings.
In other words, i would like to set the job limit to "Abort after 1 warning",
for all the jobs in the Sequence.
How do i do that?
Thanks in Advance.
But again, the sequence will abort only after the Job1 finishes with warnings because, the warnings produced by Job1 are written to the log of Job1 and not to the log of the Sequence. Even if you set the Job sequence warning limit to 1, it won't be able to read the warnings produced by Job1 until job1 finishes. So..
Kris
Where's the "Any" key?-Homer Simpson
Where's the "Any" key?-Homer Simpson
You can create your own outine of Type Transform function as belowthumsup9 wrote:In the first job activity use Warning _ Conditional as Trigger and send this link to Routine Avtivity where you can call routine rtLogFatal.
or you can set Warning Limit to 1 in the Job Run Properties of Director.
Call DSLogFatal("One or more jobs failed due to Warnings", Arg1)
Ans = 1
and call this in your routine activity.
Doesn't help. The main sequence will still abort only after Job1 finishes with warnings and the main sequence gets the status of Job1.thumsup9 wrote:You can create your own outine of Type Transform function as belowthumsup9 wrote:In the first job activity use Warning _ Conditional as Trigger and send this link to Routine Avtivity where you can call routine rtLogFatal.
or you can set Warning Limit to 1 in the Job Run Properties of Director.
Call DSLogFatal("One or more jobs failed due to Warnings", Arg1)
Ans = 1
and call this in your routine activity.
Kris
Where's the "Any" key?-Homer Simpson
Where's the "Any" key?-Homer Simpson
If i run the job individually, i can set the job limit to 1.kris007 wrote:Let me ask you one more question. When you say the Job1 aborts as soon as it logs its first warning, do you mean as soon as it encounters any rejects or is it just any other warning. If you can explain about this, may be we can have a solution in hand.
When the job encounters 1 warning, it aborts.
Now since i am running the job through Sequence, i don't have control to set the job limit.
I would like to do the same thing while running the job through the Sequence too.
Hope it is clear now.
Thanks in Advance.
No. I have already understood that part. My question is why would a job finish with warnings in your case. Is it because, you are collecting rejects through a reject link and hence it finishes with warnings or you just want to be very very careful that you want it to abort as soon as it logs it first warning. What is your exact requirement? Why is it that you want it to abort after the very first warning message? Besides, the limit you can set in the Director is only during runtime. You can't achieve that while you schedule the job except you set it Project wide.
Kris
Where's the "Any" key?-Homer Simpson
Where's the "Any" key?-Homer Simpson
Sure you do... or at least you should. If you run the Sequence job itself with a Warning Limit of 1 it should pass that limit to all child jobs it runs automatically. As noted, it's supposed to be as easy as that.poorna_76 wrote:Now since i am running the job through Sequence, i don't have control to set the job limit.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers