Scheduling Every 2 Hours

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

Post by ray.wurlod »

You basically have two choices.

1. Use a scheduler that allows you to schedule tasks every two hours and invoke your job through the command line interface (dsjob).

2. Create a job control routine that runs your job every two hours (see SLEEP statement in the BASIC manual). In this case you really should provide some mechanism for notifying the controlling job to stop gracefully.


Ray Wurlod
Education and Consulting Services
ABN 57 092 448 518
sankar18
Participant
Posts: 34
Joined: Mon Dec 16, 2002 1:18 am

Post by sankar18 »

Hi,

Use the scheduler, in the Director. create a schedule for the job you want to run every 2 hours. you check the scheduler service in windows nt is started, if not start the service.

with regards,
T Sankar
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

The Director doesn't allow you to schedule something every two hours, only at a specific time over a varying selection of days.

Don't know about NT and its scheduler, but I *guess* that with Unix and cron you could make an initial Schedule via the Director and then 'tweak' it on the Unix side to make it run every two hours. Never tried and I'd guess that DataStage would get a little, err... 'confused' the next time you looked at the Schedule in the Director.

We always end up going with Ray Option #2 above - a Job Control loop. Parameters to the batch can control sleep time and number of times thru the loop, so that you could start it at a fixed time each day, loop thru X times sleeping Y seconds between iterations (in your case 7200). Make sure X allows it to stop at an appropriate time so that it doesn't run into any nightly operations or the next day's launch. HTH.

-craig

Edited by - chulett on 01/04/2003 11:07:17
Post Reply