Page 1 of 1

Datastage scheduler for business week days

Posted: Tue Jan 10, 2006 10:33 am
by reddy
Hi Gurus,

we want to schedule a job to run every 2 hours during business hours over the weekdays using datastage scheduler.I know we can't run using datastage scheduler.
we don't have third party tools like autosys here.
Is there any alternatives......

Thanks in advance.

Reddy

Posted: Tue Jan 10, 2006 11:12 am
by ArndW
There is no DataStage scheduler, it uses the default Windows scheduler (AT). I don't know why you can't run the DataStage scheduler, unless you haven't installed it on your server. The free UNIX utilities such as mks-toolkit or the Microsoft one (I can't recall the name) have versions of the UNIX cron which will let you do more complicated scheduling.

Posted: Tue Jan 10, 2006 11:46 am
by dnsjain
If do not want to write any scripts and just do it from DataStage, Just schedule the job 12 times to start at different time interval.

You need to make sure that job finishes before two hours.

Dinesh

Posted: Tue Jan 10, 2006 12:19 pm
by reddy
Hi Guys,

Here is my detailed requirement:

I want to schedule jobs for every 2 hours on Business week days.How can you schedule jobs using datastage director scheduler only for Business week days.Here we don't have autosys.

Thanks
Narasa

Posted: Tue Jan 10, 2006 1:23 pm
by ArndW
You can schedule the job to run Mondays through Fridays at the specified intervals; but the AT scheduler doesn't know anything about the calendar and it's relation to holidays. If you need a job to specifically not run on weekdays that are holidays in the place where the server resides you will need to put in some more logic or script, which is why I suggested you look into the UNIX cron; which does offer support for holidays in the crontab settings.

Posted: Tue Jan 10, 2006 3:58 pm
by jzparad
Alternatively, you could write a job sequencer which could be scheduled to run every 2 hours. The sequencer would first call a routine which would check the day and, if required, read a file containing holidays and do whatever other checks you require. The return value of the routine could then be used to trigger the actual job.

Posted: Tue Jan 10, 2006 4:53 pm
by ArndW
Jim,

that's a good approach; since there are any number of UNIX utilities available to return you the holiday status and it's easy to parse the result of an external command from a DS Basic program. Keeps the scheduler simple and the overhead of calling up a sequencer or job is not that high if it immediately decides to stop.

Posted: Tue Jan 10, 2006 5:11 pm
by jzparad
Thanks Arnd,

I would be very interested in getting information on these UNIX utilities you are referring to. I've used cron quite a lot but I've never discovered how to schedule holidays.

Posted: Tue Jan 10, 2006 7:38 pm
by ray.wurlod
Ultimately the best solution for this kind of problem is table-driven, so that you can take into account public and business holidays - Mondays through Fridays that are not business days.

You can readily implement this via a job sequence that is scheduled to run every day, prior to the first required start time. This can determine whether today is a business day and, only if so, initiate a StartLoop .. EndLoop to run your job at the requisite interval.

Make sure your job finishes well under the interval, or include check whether the job status is currently "running" before attempting to start it.

StartLoop and EndLoop activities only became available in version 7.5.