Skip to Content
0

interval scheduling - avoid run twice the same process

May 18, 2017 at 07:16 AM

44

avatar image

Hi,
I'd like to set interval schedule for one of my process. For example: every 1 hour the process will start. But sometimes refresh time of process can be longer then 1 hour so we could have situation that the old process is still running and schedule run new one. And of course it's still the same process.
Do you have any idea how to avoid this kind of situation?
I'd like to check before run if current job is running or not - if yes - do nothing, if not - run process.

Regards

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Dirk Venken
May 19, 2017 at 07:50 PM
0

Use a control table or file.

When the job starts, first check the existence of the control object. If it exists, quit; if not, create it.

Don't forget to delete the object just before the job ends.

Share
10 |10000 characters needed characters left characters exceeded