cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
10666
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

I mean its successors for the bi-hourly runs won't work due to them not being scheduled.

Hmmmm, I am not sure this would work becuase I don't want the predecessor jobs to fire off until the dependant jobs have completed successfully.  This is needed becuase the way OPLAP cubes are deployed and built.

First the Data Warehouse jobs need to run -> cube building jobs need to complete one after another.

 

However, I did set up Jobs A and B per your suggesgion but specified a time window of 11am-12am to see what the behavior is.

I will then probably have to setup job c with 'Do not Repeat' and specify the time window for the intervals I would like it to run becuae I would have have it repeat on a set interval.  Let me know your thoughts.

 

Thanks,

Zia

 

 

Hi Derrick,

 

I just checked the history tabs for both Job A and B and it appears to be reapeting daily after 11am because they dependant upon the run #1 their predecesors.

 

Thanks,

Are your predecessor jobs set up in a similar fashion, running same occurrence OR running a new occurrence?

Jobs A and B have job dependencies on predecessor jobs using MATCHING occurrences, so each time Job A (1) or Job B (1) runs it looks at predecessor job run #1.
 

Hi Derrick,

If you look at the attachment I uploaded yesterday (Forum 4), the first job in the stream that my Jobs are dependent upon is a Data Warehouse job (070_RT_GL) below:

“03_IS_RT_U_BUILD” job is dependent upon “070_RT_GL” (which is a GL job and I do not own this job)

I would not want to touch this job as it is not mine and I am afraid I may inadvertently cuase issue and be blamed for. This job is set to not repeat but its parent job (070_PDI_REALTIME) running new occurances every two hours from 11am until 12am.

So, I would like to work around that if I could.

 

Thanks,

Zia

The easiest way is to get in touch with the owner of the other job and find out if would be feasible to have 070_RT_GL run with the same occurrence instead of run with new occurrence ;-] What does owner achieve by running a new occurrence every 2 hours at group level? Is it logging information? If it is logging information, this can be done the same way with same occurrence, but on the Options tab, select Append under Save Output Options as long as output is directed to standard output.

 

A work around would be to create a scheduled job X that is dependent on predecessor job 070_RT_GL, and set it up in a similar fashion running with new occurrence. Add a job event completed normally on Job X, and add a variable action to that job event -- this variable action will set some boolean variable X_RUN to TRUE. Your successor job A will have its own schedule -- when both time dependency AND variable X_RUN = TRUE are met, then run Job A. When Job A completes normally, add a separate job event completed normally on Job A, and add a variable action to that job event -- this variable action will reset the boolean variable X_RUN back to FALSE. It's a cycle utilizing variable, job events, and job actions -- this should do the trick, and other successor jobs B and C will follow.

 

Hi Derrick,

Actually job 070_RT_GL doesn't repeat, its parent job 070_PDI_REALTIME is set to run new occurance.  I believe he set it up this way because he needs the jobs repeated on the hour bi-hourly.  He also has similar jobs that are running other times, like 7am and 9am.

The workaround you are talking about sounds interesting.  Can this workaround only be implemented just for my job C?  Do you have any screenshots of this type of setup by any chance?

 

Thanks,

 

Or is there any way to put a time check on job C? 
Like, if hour = 13, 19 or 21 Run, else Skip?

It is possible, sounds like you've got the logic right there...1:00pm, 7:00pm, 9:00pm

 

But a simpler approach would be to create trigger jobs

trigger_job_1300 schedule this job to run at 1:00pm

trigger_job_1900 schedule this job to run at 7:00pm

trigger_job_2100 schedule this job to run at 9:00pm

Add these individual time triggered jobs into Job C, and select AT LEAST ONE DEPENDENCY MUST BE MET, and it will fire off when scheduled.

 

There's always more than one way to solve a problem :-)

 

Hi Derrick,

 

This might do it!!!

I have setup the triggers and inserted them as a dependency to Job C.

I will let you know if this would solve my problem.

 

Thanks a lot for your compassion to help me out on this!

Regards,

Zia

Hi Derrick,

 

...for some reason, Job C is not oberying the trigger/s except for the first job on the schedule (first run - 1pm job).

I have created 3 triggers; one for 1pm, 7pm, and 9pm and inserted them into Job C.

But they do not appear to be following the order.  The only run that is working as expected is the first run on the schedule (1pm run).  The other runs show as not scheduled for the triggers.  Please see the attached screenshots (Forum 6).  Could you tell me if I am doing something wrong?

 

Thanks,

 

 

Hi Zia,

 

Is this still an issue? The job dependencies on 010_GLKPIPAK_CUBE should show scheduled.

 

Also, it looks like 010_GLKPIPAK_CUBE is scheduled to run approximately every 2 hours. In addition to this schedule, you also have trigger job dependencies scheduled to run at 1:00pm, 7:00pm, and 9:00pm. To get this job to run during the triggered times, select Re-run each time when dependencies are met on the Dependencies tab - and instead of running a new occurrence, run with same occurrence.

Hi Derrick,

Yes, unfortunately I am still having issues with this.

Actually, “010_GLKPIPAK_CUBE” job itself is setup like its predecessor (Job B)  so there would be no anomalies to run right after it’s dependencies are met; which is every two hours.

So, did you want me to select 'Rerun each time dependencies are met' on the "010_GLKPIPAK_CUBE" job dependency window or on the dependency of the trigger jobs themselves?  Also, if I select 'Rerun with same occurrence' on the schedule tab of the "010_GLKPIPAK_CUBE" job, it doesn't follow the schedule of its predecessor; it only follows the first job on the schedule of its predecessor (Job B).

Thanks,

Hi Zia,

 

'Rerun each time dependencies are met' should be selected on the "010_GLKPIPAK_CUBE" job dependency window.

 

And if you configure predecessor jobs A and B and C to all run with same occurrences then that should fix problem. This way instance/occurrence numbers are matching. Oh then we run into the same issue with Job A dependencies where predecessor job is running a new occurrence and owned by someone else. Ok, this is not an easy fix and will defer back to my variable example I mentioned earlier. I will keep you posted with an example on how to set this up.

OK Derrick, I made the change and chose the effective date to be from today but I only see one instance of the schedule for  "010_GLKPIPAK_CUBE" job for today, estimated start time to be at 11:48am.

For tomorrow, I see all 7 instances starting from 11:48am.  This is very strange!

I will be anxiously waiting on your variable example.

Regards,

Zia

Review Cisco Networking for a $25 gift card