View previous topic :: View next topic
|
Author |
Message |
peterwu
New User
Joined: 21 Jun 2009 Posts: 3 Location: Toronto
|
|
|
|
Hi,
I have the following jobs flow and scheduled in CA7:
X -> A -> B -> C -> D ... up to J.
But jobs A, B, C ..... J should only run within a specified time in any day, say between 17:00 - 20:00 hours.
For example if the job is triggered before 17:00 then it should wait until 17:00 to run or if the job is triggered after 20:00 then it should wait until tomorrow 17:00 to run.
Please advise how to achieve this in CA7. Thanks. |
|
Back to top |
|
|
maheshvamsi
New User
Joined: 22 Mar 2008 Posts: 39 Location: bangalore
|
|
|
|
1. How the job X will be triggered?
2. What happens if the job X triggers between 17.00 to 20.00??
If you want the jobs A,B,C need to be triggered at only 17.00 after the jobs X triggers, you can use SASTRLR. By using SASTRLR step in Job X, you can demand it at 17.00 PM, using below command.
DEMAND,JOB=JOBNAME, TIME=1700.
This will demand Job A to run at 17.00. As you are already having triggers it will run rest of the stream.
If Job X, triggers before 1700, Job A will start running at 17.00
If Job X, triggers after 1700, Job A will start running on Nextday 17.00. |
|
Back to top |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
Hi maheshvamsi,
DEMAND will server purpose to run suite once.. It wont automate process.. |
|
Back to top |
|
|
maheshvamsi
New User
Joined: 22 Mar 2008 Posts: 39 Location: bangalore
|
|
|
|
As per my understading, Job X will run at any time, But A job should run 5 PM, after X runs.
At that time you should use demand with time option.
If you simply use Demand, Job A will run as soon as X completes. |
|
Back to top |
|
|
peterwu
New User
Joined: 21 Jun 2009 Posts: 3 Location: Toronto
|
|
|
|
Yes, job X will run at any time. Demanding and using the time option is good but not perfect in my case.
If X completed at 18:00, Job A needs to wait for the next day 17:00 to run but actually it is allow to run at between 17:00 and 20:00. Therefore the drawback is once X completed after 17:00 all the rest of jobs need to wait for the next day even X completed before 20:00.
I have to write a small program to check the time Job X completed and base on the completion time to flag a condition code on the step, then using SASSTRLR to either demand with time option or without time option depending on the return code of the program.
One thing I am not sure is the TIME=1700 option will automatic wait for the next day 17:00 to run if it is demand after 17:00 but before 23:59, or we need to use the DATE=+01 to specify the next day. Any confirmation about time option for the "NEXTDAY" issue? |
|
Back to top |
|
|
maheshvamsi
New User
Joined: 22 Mar 2008 Posts: 39 Location: bangalore
|
|
|
|
Quote: |
I have to write a small program to check the time Job X completed and base on the completion time to flag a condition code on the step, then using SASSTRLR to either demand with time option or without time option depending on the return code of the program. |
I think no need to write a program for checking a flag or time.
Just you can use demand with Time option.
If job X completes before 1700, Job A will starting running at 1700 on same day.
Else If Job X completes after 1700. JobA will start running at 1700 nextday. |
|
Back to top |
|
|
peterwu
New User
Joined: 21 Jun 2009 Posts: 3 Location: Toronto
|
|
|
|
Understandable, but it will waste for some valuable time (max 3 hours) if job A is triggered at 1701 and waiting for 24 hours before it runs while it could be finished already.
Any idea on the time option query that it will span the next day to execute?
Thanks |
|
Back to top |
|
|
maheshvamsi
New User
Joined: 22 Mar 2008 Posts: 39 Location: bangalore
|
|
|
|
I have no idea...
If you demand a job with date(like next days date) also, it will be sitting in CA7 till that time comes. |
|
Back to top |
|
|
|