SAS Data Integration Studio, DataFlux Data Management Studio, SAS/ACCESS, SAS Data Loader for Hadoop and others

LSF Run job after another, disregarding the exit code

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 11
Accepted Solution

LSF Run job after another, disregarding the exit code

Hi,

 

I would like to run a job after another, disregarding the exit code of the first job. So even when the first job encounters an error, the second job should run.

I've tried several task events in Management Console, but nothing works. Every time the first job exits, the second doesn't start.

 

Can anyone help me with this?

 

Kind regards,

Thierry


Accepted Solutions
Solution
‎04-04-2018 03:46 AM
Occasional Contributor
Posts: 5

Re: LSF Run job after another, disregarding the exit code

Posted in reply to ThierryHerrie

Are you using flows to run the jobs? If so then this should be possible in the flow properties which can be edited via management console:

 

Set the "Flow completion criteria" to All selected items end and the "Actions after the state of the flow is determined:" to continue running the flow and change the flow state after the flow is complete. I'd suggest leaving the source for the flow exit code as the default (the sum of the exit codes for all work items) or you may get a false positive if the last job in the flow succeeded.

View solution in original post


All Replies
Contributor
Posts: 31

Re: LSF Run job after another, disregarding the exit code

[ Edited ]
Posted in reply to ThierryHerrie

Are you using rsubmit, sasgsub or something else?

You should be able to use a macro loop to submit multiple rsubmits or sasgsub jobs.

Super User
Posts: 5,849

Re: LSF Run job after another, disregarding the exit code

Posted in reply to ThierryHerrie
I don't have access to LSF at the moment, but if you don't have any failed job or similar trigger, I think it needs serious tweaking to make it work like you want.

But it seem a bit odd that you want to "allow" error exit codes on your flow, how will you catch the exception and be sure that it doesn't get harder to fix if you continue the flow? As general (not specific!) advice is to cater for error handling in the job when it's feasable and predictive errors is managed.
Data never sleeps
Solution
‎04-04-2018 03:46 AM
Occasional Contributor
Posts: 5

Re: LSF Run job after another, disregarding the exit code

Posted in reply to ThierryHerrie

Are you using flows to run the jobs? If so then this should be possible in the flow properties which can be edited via management console:

 

Set the "Flow completion criteria" to All selected items end and the "Actions after the state of the flow is determined:" to continue running the flow and change the flow state after the flow is complete. I'd suggest leaving the source for the flow exit code as the default (the sum of the exit codes for all work items) or you may get a false positive if the last job in the flow succeeded.

Occasional Contributor
Posts: 11

Re: LSF Run job after another, disregarding the exit code

Posted in reply to hamishcarpenter

Thanks Hamis, that did the trick.

 

@LinusH Reason I want to run job 2 after 1, even if job 1 encounters an error is because job 2 reads and analyses the log files.

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 185 views
  • 2 likes
  • 4 in conversation