Job should not run within specific time after its predecessor has completed.
search cancel

Job should not run within specific time after its predecessor has completed.

book

Article ID: 388214

calendar_today

Updated On:

Products

ESP Workload Automation

Issue/Introduction

We have a job which is released by a predecessor being completed. However we never want the job to be submitted between 3am and 4am. Is there an ESP parm that could be added to a job definition that would control this?

Environment

Component: ESP Workload Automation
Release: ALL

Resolution

Add a selfcompleting task that would be released by the predecessor job. 

  1. JOBB will run whenever it is readied.
  2. JOBB will release the JOBTASK SelfCompleting TASK PROCESS which will query the time. It will perform an action on JOBE resetting EARLYSUB if the timeframe falls between the time queried. 
  3. If JOBB completes before the timeframe in question the task will release, complete and perform no action, releasing JOBE
  4. If JOBB completes after the timeframe in question the task will release, complete and perform no action, releasing JOBE   

EXAMPLE:

JOB JOBB                                                          
  RUN TODAY                                                          
  RELEASE JOBTASK                                                      
ENDJOB                                                               
                                                                     
JOB JOBTASK TASK PROCESS SELFCOMPLETING                              
  RUN TODAY                                                          
  IF %ESPATIME >= '03.00.00' AND %ESPATIME <= '04.00.00' THEN DO     
  ESP AJ JOBE RESET EARLYSUB('14.00.00') APPL(%ESPAPPL..%ESPAPGEN)
  ENDDO                                                              
RELEASE JOBE                                                      
ENDJOB                                                               
                                                                     
JOB JOBE                                                          
  RUN TODAY                                                          
ENDJOB