Perform Simple MATLAB Job Scheduler Configuration
If you do not have an existing scheduler in your cluster, use MATLAB® Job Scheduler to manage MATLAB jobs in your cluster.
MATLAB Job Scheduler is a scheduler that is provided with MATLAB
Parallel Server™. MATLAB Job Scheduler is intended primarily for clusters that run only MATLAB jobs. The scheduler interface is a high-level abstraction that enables you
to submit jobs to a cluster running MATLAB
Parallel Server, and allows you to avoid dealing with differences in operating systems and
environments. Follow these instructions to start the mjs service,
MATLAB Job Scheduler job manager and workers using a basic configuration.
Before you start, you must ensure that you have installed and licensed MATLAB Parallel Server on your cluster nodes. For details, see License and Install MATLAB Parallel Server in Cluster.
In the following instructions, matlabroot is the MATLAB
Parallel Server installation folder on the cluster nodes or network share location.
Set Licensing Parameter for Online Licensing
If your cluster uses MathWorks® hosted online licensing to manage licensing for your cluster users,
you must specify this in the MATLAB Job Scheduler definitions (mjs_def) file on each
cluster node. If you installed MATLAB Parallel Server in a network share location,
edit only the shared mjs_def file
Locate the
mjs_deffile for your operating system:Microsoft® Windows®:
matlabroot\toolbox\parallel\bin\mjs_def.batUNIX®:
matlabroot/toolbox/parallel/bin/mjs_def.sh
Open the
mjs_deffile. In theJob Manager and Worker Settingssection, find theUSE_ONLINE_LICENSINGparameter.Uncomment and set the
USE_ONLINE_LICENSINGparameter totrue.Microsoft Windows:
set USE_ONLINE_LICENSING=trueUNIX:
USE_ONLINE_LICENSING="true"
Configure MATLAB Job Scheduler with Admin Center
The following steps configure MATLAB Job Scheduler with Admin Center. Admin Center is a tool you can use to control and monitor the MATLAB Parallel Server processes of a MATLAB Job Scheduler cluster. If your machine does not provide graphics, use the command-line interface instead. For more information, see Configure MATLAB Job Scheduler Using Command-Line Scripts.
You start MATLAB Job Scheduler with security level 0. There are four security levels
with various features and requirements. You can modify the security level in the
mjs_def file. To learn more about MATLAB Job Scheduler security, see Set MATLAB Job Scheduler Cluster Security.
On the head node, start Admin Center. In a file explorer, navigate to
matlabroot/toolbox/parallel/binand double click the file namedadmincenter.The first time you start Admin Center, you see a welcome dialog box. A new session of Admin Center has no cluster hosts associated with it, so your first step is to identify the hosts you want to include as part of your cluster. Click Add or Find and specify the host name or IP address of the computers that you are using as your head node and compute nodes.
Follow the prompts and confirm to start the
mjsservice. Admin Center displays all monitored cluster nodes in the Hosts panel. You must ensure that each host is reachable and that themjsservice is up and running.If necessary, manually start the
mjsservice using the command-line interface. For more information, see Start mjs Service, MATLAB Job Scheduler, and Workers (Windows) or Start mjs Service, MATLAB Job Scheduler, and Workers (UNIX).Next start the MATLAB Job Scheduler on the head node. In the MATLAB Job Scheduler panel, click Start. Specify a name for your MATLAB Job Scheduler cluster and select the head node from the dropdown list.
After starting MATLAB Job Scheduler on the head node, start workers on the compute nodes where the
mjsservice is running. As a best practice, start as many workers as you have physical cores on the compute nodes. To add MATLAB Parallel Server workers, click Start in the Workers panel of the Admin Center.Select the computers to host the workers.
Select the number of workers per computer.
MATLAB Parallel Server supports MATLAB Job Scheduler clusters with up to 10,000 workers. (since R2023b)
Verify your configuration by checking worker status in the Workers panel.
To troubleshoot issues, click Test Connectivity in the Host section.
The head node uses computational resources to run MATLAB Job Scheduler. If you set up workers on the head node, they compete for resources with MATLAB Job Scheduler processes.
Tip
Avoid setting up workers on the head node. If workers use too many system resources, such as memory, processor, network, or local storage, the job manager can become unresponsive.
With a MATLAB Job Scheduler and workers running on your cluster, Admin Center might look like this figure, with the MATLAB Job Scheduler listed in the MATLAB Job Scheduler panel, and the workers listed in the Workers panel.

Note
If you need more help during the configuration, such as your cluster requires
firewall configuration or you want to set up multiple mjs
installations, see this more detailed guide Configure Advanced Options for MATLAB Job Scheduler Integration.
Connect MATLAB Client to MATLAB Job Scheduler Cluster
To use a MATLAB Parallel Server cluster, you must have a client computer running MATLAB and Parallel Computing Toolbox™. On the MATLAB Home tab, in the Environment section, select Parallel > Discover Clusters and follow the instructions to automatically discover and set up your cluster.
Alternatively, you can create a cluster profile manually as follows:
In MATLAB, on the Home tab, select Parallel > Create and Manage Clusters.
Select Add Cluster Profile > MATLAB Job Scheduler.
Create your MATLAB Job Scheduler profile and click Edit.
Specify the host name of the head node.
If the cluster uses online licensing, specify the license number.
Click Done and select Set as Default (optional).
After you successfully validate your cluster, you can now use your MATLAB session to submit jobs to the MATLAB Parallel Server cluster.
Note
If your validation does not pass, contact the MathWorks install support team.
Any MATLAB cluster workers that you start can use all the functionality you are licensed for in the MATLAB client, while checking out only MATLAB Parallel Server licenses on the cluster.
For information on configuring more advanced options for your cluster, see MATLAB Job Scheduler Configuration and Management. For example, you can set the security of
the cluster in Set MATLAB Job Scheduler Cluster Security. If you use UNIX, you can configure the mjs service to start
automatically at start time. For instructions, see Configure MATLAB Job Scheduler Using Command-Line Scripts.
After you finish your configuration, try some examples of cluster workflows in Run Code on Clusters and Cloud Platforms.
See Also
Topics
- License and Install MATLAB Parallel Server in Cluster
- MATLAB Job Scheduler Configuration and Management
- Set MATLAB Job Scheduler Cluster Security