Cronicle icon indicating copy to clipboard operation
Cronicle copied to clipboard

Max jobs per server?

Open raymatos opened this issue 5 years ago • 9 comments

Is there a way to set max number of active jobs per server, and then queue the rest?

raymatos avatar Aug 18 '19 14:08 raymatos

There isn't a setting for this, but here are a couple of workarounds.

At the category level (Admin->Categories->Edit Category) you can specify the "Max Concurrent" number of events in that category running at once.

At the event level, when you edit an event, you can specify the Concurrency (max number of that event running at the same time) then check the "Allow queued jobs" checkbox to queue the rest.

LukeJBullard avatar Aug 27 '19 21:08 LukeJBullard

If i write this, would it be merged?

raymatos avatar Nov 19 '19 04:11 raymatos

Hi, If max jobs per server is not possible, how about max concurrency throughout the entire system? Is there any way to set this?

therealppk avatar Sep 10 '20 07:09 therealppk

@jhuckaby please add one of the below features:

  1. Max concurrent tasks per server
  2. Max Concurrent tasks across the system

shlsheth263 avatar May 19 '21 07:05 shlsheth263

Implemented max concurrent jobs across the system in v0.8.61.

max_jobs

You can optionally set a global maximum number of concurrent jobs to allow. This is across all servers and categories, and is designed as an "emergency brake" for runaway events. The property is called max_jobs. The default is 0 (no limit). Example:

"max_jobs": 256

https://github.com/jhuckaby/Cronicle#max_jobs

However, I will not close this issue, because OP asked for a maximum limit per server. I'll leave this open until I have time to implement that.

jhuckaby avatar May 22 '21 01:05 jhuckaby

Implemented max concurrent jobs across the system in v0.8.61.

max_jobs

You can optionally set a global maximum number of concurrent jobs to allow. This is across all servers and categories, and is designed as an "emergency brake" for runaway events. The property is called max_jobs. The default is 0 (no limit). Example:

"max_jobs": 256

https://github.com/jhuckaby/Cronicle#max_jobs

However, I will not close this issue, because OP asked for a maximum limit per server. I'll leave this open until I have time to implement that.

Thanks @jhuckaby.

This will solve our problem for now.

shlsheth263 avatar May 22 '21 05:05 shlsheth263

Implemented max concurrent jobs across the system in v0.8.61.

max_jobs

You can optionally set a global maximum number of concurrent jobs to allow. This is across all servers and categories, and is designed as an "emergency brake" for runaway events. The property is called max_jobs. The default is 0 (no limit). Example:

"max_jobs": 256

https://github.com/jhuckaby/Cronicle#max_jobs

However, I will not close this issue, because OP asked for a maximum limit per server. I'll leave this open until I have time to implement that.

@jhuckaby when maximum jobs are running, new jobs launched after that fail instead of going in queue.

Error:

Failed to launch scheduled event: EVENT_NAME: Global maximum of 35 jobs already running.

please fix this.

shlsheth263 avatar May 23 '21 14:05 shlsheth263

@shlsheth263 The queue feature works fine for me in conjunction with max_jobs. You will only ever see the new error message if the event queue is disabled. Make sure your event has the queue feature enabled.

jhuckaby avatar May 23 '21 15:05 jhuckaby

@shlsheth263 The queue feature works fine for me in conjunction with max_jobs. You will only ever see the new error message if the event queue is disabled. Make sure your event has the queue feature enabled.

Yes. Queue was disabled for few events which failed. Thanks.

shlsheth263 avatar May 23 '21 16:05 shlsheth263