Only run process when another job has finished

Hi all,
There is a requirement where ONE item is to be processed automatically once it is added to the queue.
We have opted for triggering a job once a new item is added the queue with following settings:

  • Minimum number of items to trigger the first job: 1
  • Maximum number of pending and running jobs allowed simultaneously: 1 - we do not want this to be put higher, because then two or more jobs will run simultaenously and the job fails (faulted). The item becomes “in progress” while is still to be processed.

How to best approach this? There is no check to see if there are any additional items in the queue in the process code.

Thanks.

Seems good. Isn’t the above working?

Was this ever resolved? I have the same issue;

If I set both settings to 1, the first job to come in runs with no issues, but the second gets stuck in the queue with status “New” as the previous job is still running. I’m trying to get the “New” item to automatically run as soon as the previous job completes.

If I set “Maximum number of pending and running jobs allowed simultaneously” to say 2, one of the jobs will get stuck in the queue as “InProgress” and will never complete.

Any help would be much appreciated.