cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
10685
Views
0
Helpful
56
Replies

How to schedule a job for centain intervals that is dependant on other hourly jobs?

ziaul_hoque1
Level 1
Level 1

Hi support community,

 

I hope you would be able to help me out which will be greatly appreciated.

I have a job that I only needs to run on certain times but this job is dependant upon other jobs that run every two hours.

So, I have this sequence:

Job A: runs at certain times and it is dependant on Job B

Job B: runs every two hours which is also dependant on Job A

Job A: which runs every two hours from 11an until 11pm everyday.

How can I accomplish job A to run at certain hours?  You see, Job B has to complete which copies an application and I would like to take that application and rername that application to preserve data.  Please let me know if you need more infromation.

 

Thanks,

 

56 Replies 56

Hi Zia,

 

When making intraday changes, are you disabling the job(s) to remove them from the schedule?

 

I've listed below in step order how to setup this type of dependency using variables

 

Step 1:

Create variable TEST_RUN_SUCCESSORS TYPE = BOOLEAN and initialize to FALSE

 

Step 2:

Create (2) variable actions:

TEST_SET_RUN_SUCCESSORS_FALSE, set variable TEST_RUN_SUCCESSORS = FALSE

TEST_SET_RUN_SUCCESSORS_TRUE, set variable TEST_RUN_SUCCESSORS_TRUE

 

Step 3:

Create (2) job events, then add (2) variable actions:

TEST_SET_RUN_SUCCESSORS_TRUE, triggered by job completed normally

TEST_SET_RUN_SUCCESSORS_FALSE, triggered by job completed normally <- used for resetting variable back to false

 

Step 4:

Create trigger JOB X and have this setup similar to 070_PDI_REAL_TIME, running a new occurrence every 120 minutes up to 7 times.

In JOB X,

add 070_PDI_REAL_TIME as job/group dependency whenever it completes normally with matching occurrence.

Add job event TEST_SET_RUN_SUCCESSORS_TRUE

 

Step 5:

Create successor JOB C and have this setup to run between the hours of 11:00am and 11:59pm, running the same occurrence

In Job C,

Add a variable dependency TEST_RUN_SUCCESSORS = TRUE

Add a job dependency TEST_TRIGGER_JOB_1300

Add a job dependency TEST_TRIGGER_JOB_1900

Add a job dependency TEST_TRIGGER_JOB_2100

Select at least one must be met, AND rerun each time dependencies are met

Add job event TEST_SET_RUN_SUCCESSORS_FALSE <- used for resetting variable back to false

 

This setup will allow Job C to run whenever 070_PDI_REAL_TIME completes normally and setting variable to TRUE, or whenever one of the trigger jobs complete normally (1:00pm, 7:00pm, and 9:00pm).

 

BR,

Derrick Au

Hi Derrick,

 

I followed your steps and the job is being scheduled the same way. Please see attached (forum 7).

 

Thanks,

Zia

Hi Zia,

 

Just a few observations, in Step 3:

Job Event - GLKPIPAK_SET_RUN_SUCCESSORS_TRUE

add ONLY GLKPIPAK_SET_RUN_SUCCESSORS_TRUE

(the names are matching to make it easier and tie each other back)

 

Job Event - GLKPIPAK_SET_RUN_SUCCESSORS_FALSE

add ONLY GLKPIPAK_SET_RUN_SUCCESSORS_FALSE

 

Why are there multiple occurrences for TEST_TRIGGER_JOB_1300, 1900, and 2100 trigger jobs? Each of these jobs should run at the times specified (1:00pm, 7:00pm, 9:00pm) -- also set do not repeat

 

BR,

Derrick Au

 

 

 

Hi Derrick,

 

Thanks for the correction!

I do have the triggers set for specified time and set to not repeat (PSA screenshot).  Not sure why 1PM trigger keeps running...

 

Thanks,

Zia

Hi Derrick,

 

I am seeing some stragne behavior on this setup.  Please see the attached (Forum 9) from yesterday's run from Tidal and you will notice that the schedules are running on two hours after I made the correction per your update.  So, all the triggers are following their parent and not obeying the actual start time window.  The "010_GLKPIPAK_CUBE" job started at the hours below with multiple runs:

010_GLKPIPAK_CUBE (4) started at 11:48 PM

010_GLKPIPAK_CUBE (5) started at 11:19 PM

010_GLKPIPAK_CUBE (6) started at 11:14 PM

010_GLKPIPAK_CUBE (7) started at 11:15 PM

Should I make the parent job "501_GLKPIPAK_CUBE_PROCESS" depend on the actual job "050_GLTB_RT_CUBE" that I would like them to follow instead of making it dependant on the top job in the order "070_PDI_REAL_TIME"?

 

Thanks,

Zia

Hi Zia,

 

Yes, do that -- make "501_GLKPIPAK_CUBE_PROCESS" depend on the actual job "050_GLTB_RT_CUBE" and I noticed the time-triggered jobs are running a new occurrence up to 7 times. These time-triggered jobs should only execute once as per specified time, so 001_GLKPIPAK_TRIGGER_1300 has a start window at 1:00pm, and 002_GLKPIPAK_TRIGGER_1900 has a start window at 7:00pm, etc

 

BR,

Derrick Au

 

 

Hi Derrick,

 

I made the change and it is still not follwoing the order.  All jobs ran after 10pm.

Another thing I did was that I moved all the trigger jobs out of its parent "501_GLKPIPAK_CUBE_PROCESS" and put them in the root and thye are now working as expected.

I will now take out the vairable and see how it would behave.

 

Thanks,

Zia

I wanted to attach a screenshot of the jobs from yesterday.  Please see attached (Forum 10)

 

Thanks,

Zia

Hi Derrick,

 

I took out the variable dependancy and only the first job was scheduled and ran right away b/c the trigger for 1pm was satisfied.  However, For all other runs, trigger job appear to be unscheduled just like I mentioned above on Forum 6 attachment.

Do you have any other suggestion?

 

Thanks,

Zia

Hi Zia,

 

How long does 1PM trigger keep running for? What is frequency? What is command running? and are there any dependencies set on 1PM trigger job?

 

BR,

Derrick Au

This new job X GROUP would then be dependent on 070_PDI_REALTIME GROUP, and can be used as a trigger for your successor job C. I will need a little time to put this together.

From the screenshots I see the predecessors are scheduled and currently waiting on dependencies, and there should only be a single instance of 050_GLPKG_RT_CUBE (because here we are running the same occurrence/instance).

 

I just got another message regarding successors for the bi-hourly runs. If the successors Job B and Job C are set up the same way (running the same occurrence), you will always see Job B run #1 and Job C run #1 ... there are no runs for #2, 3, 4, etc. Keep in mind this is only running the same occurrence but at different intervals throughout the day. So for example, Job A run #1 starts at 10:30am, two hours later this same job will fire off at 12:30pm.

Review Cisco Networking for a $25 gift card