Scheduling of jobs every 2 minutes

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
rajeev_prabhuat
Participant
Posts: 136
Joined: Wed Sep 29, 2004 5:56 am
Location: Chennai
Contact:

Scheduling of jobs every 2 minutes

Post by rajeev_prabhuat »

Hi,

I have a job which has to be scheluded every day and which should run every 2 minutes, is this possible. According to my conclusion is that this is not possible. Is there anyother way that i can implement this requirment.

Regards,
Rajeev Prabhu
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

If your job takes less than 2 minutes to run, you have a chance of succeeding.

But, we cannot even begin to help you past that comment because we don't know what you are trying to do. If you have issue with scheduling a 2 minute repeating task, then use an enterprise scheduler that executes the dsjob command to job your job on demand.

If you want, write your own job control that continuously runs all day long and controls the execution of your transformation job. Should it always run every two minutes, or should there always be a two minute delay between executions? What if a transformation job run exceeds two minutes, should you start another instance of the job running?

Are your concerns that you won't be able to process the desired data in under two minutes? Maybe you should state what your transformation job has to do, including row counts and logic so that we can help you better.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
rajeev_prabhuat
Participant
Posts: 136
Joined: Wed Sep 29, 2004 5:56 am
Location: Chennai
Contact:

Post by rajeev_prabhuat »

Hi,

See we have to query on a table that has be executed every 2 minutes and check the jobs which has taken more time than usual and if the the time taken is more than the usual time we have to send a mail to the enduser saying that this job has taken more time than usual.

It is not necesary that it should be 2 minutes itself we can change the time, but my query is that can we schedule a job every 2 minutes in scheduler ?. I tried it out by adding to schedule here only day on which it has to be run and at what time it has to be run can be specified, can we specify every 2 minutes it has to be run. This was my query.

Regards,
Rajeev Prabhu
kcbland wrote:If your job takes less than 2 minutes to run, you have a chance of succeeding.

But, we cannot even begin to help you past that comment because we don't know what you are trying to do. If you have issue with scheduling a 2 minute repeating task, then use an enterprise scheduler that executes the dsjob command to job your job on demand.

If you want, write your own job control that continuously runs all day long and controls the execution of your transformation job. Should it always run every two minutes, or should there always be a two minute delay between executions? What if a transformation job run exceeds two minutes, should you start another instance of the job running?

Are your concerns that you won't be able to process the desired data in under two minutes? Maybe you should state what your transformation job has to do, including row counts and logic so that we can help you better.
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

DataStage on Unix simply uses cron, on Windows it uses AT. If you need more flexibility, you need to write your own scheduling system. You can write a script that runs your job, then adds the next entry to cron for execution 2 minutes later. You can do anything you want.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Exactly! Write your own job control and have it do whatever you want. Another possibility: launch the job control job once and then, in a loop, run your polling job. Sleep for two minutes at the bottom of the loop. Lather, rinse, repeat.

Oh, and build some way out of the loop. :wink: Food for thought.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

It's quite easy to write in DataStage BASIC, given a modicum of programming skills in that language. I really believe that two minutes is ridiculously short as a checking interval; you're going to be chewing up resources just to watch the jobs! Make it longer - five minutes, maybe, or ten.

If you don't have the programming skills, there are lots of consultants out there who do, whose services you can hire.
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