Automated method to enable/disable steps within jobs

Frank L (2 posts)
October 18, 2018 12:16 PM
Accepted Answer

Hi Bill,

We have AdTempus running on (2) servers with one acting as the primary and the other as the secondary (backup).  We have identical jobs scheduled and running on both servers performing identical tasks except certain steps are DISABLED for jobs on the secondary server due to the fact that it's the backup server.  Do you have a script or method where we can ENABLE or DISABLE steps within jobs across multiple jobs?  This would be extremely helpful in the event we have to switch servers.

Thanks,

Frank Lezaja 

Bill Staff (601 posts)
October 18, 2018 01:08 PM
Accepted Answer
The best way to do this and make it easy to maintain would be to define a Job Variable at the server level that indicates whether this is the Primay or Secondary server. Then add a Job Variable Condition to the relevant steps, so that the step doesn't run if the variable is set to "Secondary". If you have some way of identifying which steps this should apply to, I can put together a script that will add the conditions for you.
Frank L (2 posts)
October 19, 2018 02:03 PM
Accepted Answer
 I understand the System Job Variable and know which steps to skip within given jobs.  A script would be great if you have one available!
Bill Staff (601 posts)
October 22, 2018 12:35 PM
Accepted Answer
How many jobs are we talking about here? Is there some way that a script could identify which jobs/steps to add the condition to (like they all run the same program, or some other detail it could look at)? Otherwise you'd have to supply the script with a list of jobs and steps that it should update.

Replies are disabled for this topic.