Datastage scheduler for business week days

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
reddy
Premium Member
Premium Member
Posts: 168
Joined: Tue Dec 07, 2004 12:54 pm

Datastage scheduler for business week days

Post 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
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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.
dnsjain
Charter Member
Charter Member
Posts: 34
Joined: Thu May 08, 2003 2:12 pm

Post 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
reddy
Premium Member
Premium Member
Posts: 168
Joined: Tue Dec 07, 2004 12:54 pm

Post 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
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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.
jzparad
Charter Member
Charter Member
Posts: 151
Joined: Thu Apr 01, 2004 9:37 pm

Post 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.
Jim Paradies
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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.
jzparad
Charter Member
Charter Member
Posts: 151
Joined: Thu Apr 01, 2004 9:37 pm

Post 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.
Jim Paradies
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply