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
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.
Are you using rsubmit, sasgsub or something else?
You should be able to use a macro loop to submit multiple rsubmits or sasgsub jobs.
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.
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.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.