How discard new instance of batch and job that already is running?

28 views
Skip to first unread message

guadalinfo...@gmail.com

unread,
May 6, 2019, 11:13:16 AM5/6/19
to schedulix
Hi,

We have multiples jobs a and batch who are running many times in the day. Some of those batchs and jobs are running while the same batch or job is lauch one more time... 

Are there any option to discar a batch or job if the same batch or job are running?

Thank you.

Dieter Stubler

unread,
May 6, 2019, 11:46:42 AM5/6/19
to schedulix
Hi,

Have a look at the Examples BATCH_WAIT and BATCH_SKIP.
Those are doing exactly what you want.
The BATCH_WAIT waits with its jobs until the previous one has finished.
The BATCH_SKIP just skips and is doing nothing if the prevois one isn't final yet.
Both are using a synchronizing resource in their top folders to lock them exclusivle with sticky mode.
BATCH_WAIT waits and BATCH_SKIP times out and skips.

Regards
Dieter


Alonso Gómez

unread,
May 8, 2019, 12:13:48 PM5/8/19
to schedulix
Hello dieter

Thanks for your reply...

Now my problem is when a batch ends and releases the resource, if other jobs in a batch are using the same synchronizing resource (with sticky), this jobs are skipping but when the nex job (in the batch) catch the resource this start the execution. I need all the jobs in the batch are skipped.

Thank you for your time.

Dieter Stubler

unread,
May 8, 2019, 2:47:49 PM5/8/19
to schedulix
Hi,

Try just using the examples.

Assume your Batch is called SYSTEM.MYBATCH.

Just copy the SYSTEM.EXAMPLES.E0255_BATCH_SKIP Folder to SYSTEM.MYBATCH_SKIP.
Remove the Jobs STEP_1 and STEP_2 (Use FORCE because the are still children of MAIN) of the MAIN Batch.
Now just add your SYSTEM.MYBATCH as a child to MAIN.

Run or schedule SYSTEM.MYBATCH_SKIP and everything will work fine.

Regards
Dieter
Reply all
Reply to author
Forward
0 new messages