cancel
Showing results for 
Search instead for 
Did you mean: 

How do I prevent multiple instance of a Job running concurrently

ChrisGela
Participant
0 Kudos

Hi Community,

I have schedule a HR background job running periodically every 30 minutes.

The HR admin has requested that the if the job overruns 30min that the next job does not kick off.

Is there a way to prevent multiple instance of that job running concurrently on the system.

Kind Regards,

Chris

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

>Is there a way to prevent multiple instance of that job running concurrently on the system.

Yes, but you will need to write some custom abap code for that. Yo ucan check is the job is already in status "active" or you ca n set an enqueue lock when runnin g the jon and check this lock.

Regards,

Olivier

ChrisGela
Participant
0 Kudos

Hi Juan,

Not possible as far as i know... periodic jobs can't be set with those conditions as standard

Thanks for the info.

Yes, but you will need to write some custom abap code for that. Yo ucan check is the job is already in status "active" or you ca n set an enqueue lock when runnin g the jon and check this lock.

Olivier, Thanks for the info, I suspected that the program (code) need to take care of locking the resources. Problem is that it is SAP standard code - RPTARQPOST. I am sure that SAP would have catered for scenarios where there is more than one instance of the job running?

Anyway, we have logged a message to SAP, regarding why there are reported duplicate leave transactions in our system and why the job overruns etc. Thanks for all the input.

Kind Regards,

chris

Former Member
0 Kudos

Hi,

>Problem is that it is SAP standard code - RPTARQPOST.

No problem here. You can add your custom abap code as a first step of the job.

Regards,

Olivier

Answers (1)

Answers (1)

JPReyes
Active Contributor
0 Kudos

Not possible as far as i know... periodic jobs can't be set with those conditions as standard

Regards

Juan