Page 1 of 1

How to schedule a batch with different dates in each month

Posted: Sat Dec 09, 2006 11:25 pm
by reddy
Hello sir,

I need to schedule a batch with different dated in each month.
For example in december i need to run this batch on dec 20th and dec 31st and january 4th,february 5th etc...
we have all these run dates in the oracle run_date table.
Can you please helpme out on this issue.

Thanks in advance.

Reddy

Posted: Sun Dec 10, 2006 12:11 am
by chulett
How are you doing your job scheduling now? Not for this, but in general.

Through the Director, you can simply 'Add to Schedule' 12 times using the proper date in each month. Or an Enterprise Scheduler like Control-M could do this easily. But I assume you somehow want to leverage this 'run_date' in your Oracle table, yes?

Worst case you could run your job every day, check the Oracle table and if the current date is not found in the table, exit without further processing. Only on a successul hit would you complete the processing.

Posted: Sun Dec 10, 2006 12:41 am
by DSguru2B
Good piece of advice by Craig. If you want to make this dynamice then as Craig said, have a job that checks the date from oracle table. A job that is scheduled to run everyday that checks the current date with the dates in the oracle table, if there is a hit, it puts out a flag in a file. The batch job checks for that flag. If the flag is found, it will continue further processing, if not, it will end gracefully.

Posted: Mon Dec 11, 2006 8:02 am
by reddy
Thanks alot for valuable suggestions.

I am scheduling the jobs using Datastage Director.

Thanks
Reddy

Posted: Mon Dec 11, 2006 8:10 am
by reddy
Hello Sir,

My business scenario like this :

1.I need to run job1 and job2 daily using batch1 except on 4th business day of every month.
2.I need to run job1 and jobx and joby 4th business day of every month
using batch2.

How can i design the batch and scheduling using datastage.

note: i will get the 4th business day of every month date from the oracle table.

Thanks in advance.
Reddy

Posted: Mon Dec 11, 2006 8:22 am
by DSguru2B
Use the advice given earlier to extend to your current requirement. Have your control job run every day. Check if todays date is 4th business day or not. You can use ICONV/OCONV with DW for that. If yes, then run batch1 else run batch2.