Page 1 of 1

Scheduling of jobs every 2 minutes

Posted: Sun Jan 02, 2005 11:27 pm
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

Posted: Sun Jan 02, 2005 11:48 pm
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.

Posted: Mon Jan 03, 2005 12:11 am
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.

Posted: Mon Jan 03, 2005 8:02 am
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.

Posted: Mon Jan 03, 2005 8:41 am
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.

Posted: Mon Jan 03, 2005 3:22 pm
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.