BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
ThierryHerrie
Obsidian | Level 7

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

1 ACCEPTED SOLUTION

Accepted Solutions
hamishcarpenter
Fluorite | Level 6

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

4 REPLIES 4
dgritt
Obsidian | Level 7

Are you using rsubmit, sasgsub or something else?

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

LinusH
Tourmaline | Level 20
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
hamishcarpenter
Fluorite | Level 6

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.

ThierryHerrie
Obsidian | Level 7

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.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

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