How to create a custom scheduler
I want to create a scheduler to montor the status of list of backend jobs ( say limit is 10). there going to be job queue. Need to pick a job form job queue when one of the current processing job is finished.
What is the best way to implement this
Comments
When you start background job, in the master process, you can collect $zchild with a pid of started process
and collect them in the logs, and then in the loop you can check $data(^$job(child)) if it's still running
that's the simplest approach
Thanks, much appreciated
You might want to look into Work queue Manager. It can be configured to use multiple agents to process anything in a queue. This approach is best if the queue is fixed at the start and during the run of the processing, i.e. no items added to be processed.
If you are more for a spooling type setup. You can use Integrations to monitor a spool global and start jobs based on poolsize etc.
ref: Using the Work Queue Manager | Using the Work Queue Manager | InterSystems IRIS Data Platform 2025.1