Child pages
  • NMIS 9 Scheduler
Skip to end of metadata
Go to start of metadata

NMIS 9 has performed a big change VS nmis 8 where the main process was executed by a cron job.

NMIS 9 works as a service and a main process - the scheduler - redirect all the jobs to a queue. It allows to control the priority, between other improvements.

The scheduler starts a number of workers that perform the jobs in the queue. 

The scheduler

What the scheduler has? We can have a look at the jobs in progress and scheduler with the following command:

/bin# ./nmis-cli act=list-schedule

We can remove the scheduled jobs or one specific job with the following:

/bin# ./nmis-cli act=delete-schedule id=<schedule_id|ALL> [job.X=...]

Controlling the nmis workers

We can control the number of workers with the following parameters in nmis9/conf/Config.nmis file: 

Max number of workers

The max number of child processes is controlled by the following parameter:

'nmisd_max_workers' => 10,

Worker cycles

By default, a worker is started by the scheduler and the process will not die while the parent process is alive.

The process will sleep for 30 default seconds is it doesn't have any job to perform. This can be changed with the following parameter: 

'nmisd_worker_cycle' => 30

We can change the default behaviour so the worker is killed every N cycles. Another process will be started by the parent once the child process reaches the max cycles, if the number of children processes doesn't reach the max_workers. 

	'nmisd_worker_max_cycles' => 5,

Scheduler cycle

The main process will sleep for 10 seconds once it finishes to review all the workers and sends the jobs to the queue. We can control the number of seconds the scheduler is sleeping with the following parameter:

	'nmisd_scheduler_cycle' => 10,
  • No labels