How to hold a job that is self-dependent and restarts immediately when it completes

book

Article ID: 224348

calendar_today

Updated On:

Products

CA Workload Automation AE - Scheduler (AutoSys)

Issue/Introduction

When a job contains a dependency on itself and there is no other condition that would need to be met for the job to start, the job starts immediately after it completes. When attempting to send a JOB_ON_HOLD event for such a job, the event always fails to process because the job is running. What is the best way to put a job like this on hold/ice?

Environment

Release : 11.3.6/12.0

Component : CA Workload Automation AE (AutoSys)

Resolution

A JOB_ON_HOLD/ICE event has to be processed while the job is not in a running state. Since the amount of time between job runs for a job that only contains a dependency on itself is a fraction of a second, there is not enough time to send the event to put it on hold/ice. The best alternative is to temporarily edit the job definition and remove the dependency on itself. After that is done, the job will stop after its next completion. When you are ready to start running the job again, replace the dependency in the job definition and force start the job.