search cancel

Schedule a job one day and a few days later make it a pred to another job

book

Article ID: 133678

calendar_today

Updated On:

Products

ESP Workload Automation

Issue/Introduction

See below for details: Job J528 runs on the 11th, but it needs to be a predecessor to job J462 which runs the 15th of month

 

UNIX_JOB J528 DOCMEM(APPDEV01)                                             
RUN 11TH DAY OF MONTH LESS 0 WORKDAYS  - This job will need to be a pred to a job that runs on the 15th day of month
....
ENDJOB

UNIX_JOB J462 DOCMEM(APPDEV01)                           
...                                           
RUN 15TH DAY OF MONTH PLUS 0 WORKDAYS     
ENDJOB                           


                         

Environment

Release : 12.0

Component : CA ESP WORKLOAD AUTOMATION

Resolution

Use the JOBATTR parameter to make the job a EXTERNAL on the second run:

UNIX_JOB J528 DOCMEM(APPDEV01)   
IF TODAY('15TH DAY OF MONTH PLUS 0 WORKDAYS') THEN +
JOBATTR EXTERNAL SCHEDULED('11TH DAY OF MONTH LESS 0 WORKDAYS')
....
ENDJOB