stopworker
R2026bStop MATLAB worker process
When you need to remove a worker from the cluster, use the
stopworker script to stop it. You can stop the worker immediately,
or wait for it to finish its current task by using the --onidle
option.
The
stopworker executable resides in the folder
(Windows® operating system) or matlabroot\toolbox\parallel\bin
(Linux® operating system). Enter the command at a Windows or Linux command-line prompt, respectively.matlabroot/toolbox/parallel/bin
Syntax
stopworker
stopworker --options
Description
stopworker stops a MATLAB® worker process that is running under the mjs
service.
stopworker accepts the
following options. You can use multiple options together in the same command. Precede each
option with two dashes (--options--).
Before R2026b: To specify an option, use a single dash
(-).
| Option | Operation |
|---|---|
--name <worker_name> | Specify the name of the MATLAB worker to stop. The default is the value of the
|
--jobmanager | Specify the name of the job manager that manages the worker you want
to stop. The default is the value of |
--onidle | Stop the MATLAB worker after it has finished its current task. If the MATLAB worker is idle, stop the worker immediately. |
--clean | Delete all checkpoint information associated with this worker name after stopping it. |
--remotehost <hostname> | Specify the host on which to stop the MATLAB worker. If you do not specify a host, the command stops the worker on the local host. |
--baseport <port_number> | Specify the base port used by the |
--secretfile <path_to_shared_secret_file> |
Specify the path to the shared secret file to use to sign the
command. This option is required when the $CHECKPOINTBASE/security/secret |
--verbose, -v | Display detailed progress information about the command execution. |
Examples
Stop the worker with the default name on the local host.
stopworkerStop the worker with the default name, running on the host
WorkerHost.
stopworker --remotehost WorkerHostStop the workers named worker01 and worker02,
running on the host
WorkerHost.
stopworker --name worker01 --remotehost WorkerHost
stopworker --name worker02 --remotehost WorkerHost
See Also
mjs | nodestatus | startjobmanager | startworker | stopjobmanager