Create a cyclic job
search cancel

Create a cyclic job

book

Article ID: 206222

calendar_today

Updated On:

Products

CA Workload Automation DE DSERIES- SERVER CA Workload Automation DE - Scheduler (dSeries)

Issue/Introduction

We need to create a cyclic application to schedule 2 jobs A and B every hour between 9h to 18h

Job B is dependent on job A.

The execution time of job A and job B can be more than 1 hour. We want to have something like:

at 9h: execution time (A+B): 30 minutes, Next execution 10h

at 10h: execution time (A+B): 1h20, Next Execution 12h

When we use the method below: 

if (WOB._RHH < '19' && APPL._SDATE == WOB._RDATE)

  execTrigger('%APPL._event','ADD');

The application is rescheduled at the end of the last execution. If the application finish at 11H20, the system reschedule at 12h20, and I didn’t have a schedule at 12h.

When we use a sample with a javascript used with an alert like: 

if (WOB._subcount &lt; WOB.cycQty) {

   execCommand('%WOB._fullname','%(APPL._name).%(APPL._gen)', 'ACTION RESET Earlysub("%WOB._RDATE %WOB._RTIME plus %(WOB.cycInterval) minutes")') ;

   execCommand('%WOB._fullname','%(APPL._name).%(APPL._gen)', 'ACTION RESUB') ;

} else {

  if ( WOB.cycQty == 0 &amp;&amp; WOB.cycInterval > 0) {

    execCommand('%WOB._fullname','%(APPL._name).%(APPL._gen)', 'ACTION RESET Earlysub("%WOB._RDATE %WOB._RTIME plus %(WOB.cycInterval) minutes")') ;

    execCommand('%WOB._fullname','%(APPL._name).%(APPL._gen)', 'ACTION RESUB') ;

  }

}

We have the same problem. We can create a schedule :09:00 every 60 minutes until 18:00 daily but it works only one day.

I can create all schedule (9h, 10h, ….) but If  I have a job scheduled every 5 minutes, I will create many schedule.

Have you an other solution for a cyclic job ?

 

Environment

Release : 12.2

Component : CA WORKLOAD AUTOMATION DE (DSERIES)

Resolution

You can create an Event that triggers the application every 1 hour (with resume 8:55 AM and suspend 6:05 PM).

It will try to trigger the application every hour: 9 AM, 10 AM , 11 AM , etc until the last trigger at 6 PM.

Then, inside the application, select the "Do Not Trigger If Active" option.

So if the application runs at 9 AM and completes by 9:30 AM ... it will trigger at 10 AM and run

If the application then runs at 10 AM and takes longer than 1 hour ...

at 11 AM, the application will not be triggered because of the "Do not trigger if active" option.

It will try again at 12 PM. There is not any need for a JavaScript.

Problem resolved by applying the provided solution.