Skip to Content
avatar image
Former Member

interval scheduling - avoid run twice the same process

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    May 19, 2017 at 07:50 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded