This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Simple Batch Processing

Offload execution of a function or script to run in a cluster or desktop background

When working interactively in a MATLAB® session, you can offload work to a MATLAB worker session to run as a batch job. The command to perform this job is asynchronous, which means that your client MATLAB session is not blocked, and you can continue your own interactive session while the MATLAB worker is busy evaluating your code. The worker can run either on the same machine as the client, or if using MATLAB Parallel Server™, on a remote cluster machine.

Functions

expand all

batchRun MATLAB script or function on worker
diaryDisplay or save Command Window text of batch job
loadLoad workspace variables from batch job
waitWait for job to change state
deleteRemove job or task object from cluster and memory

Examples and How To

Run Batch Parallel Jobs

Use batch to offload work from your MATLAB session to run in the background.

Run Script as Batch Job from the Current Folder Browser

From the Current Folder browser, you can run a MATLAB script as a batch job by browsing to the file’s folder, right-clicking the file, and selecting Run Script as Batch Job.

Share Code with the Workers

Find out how to pass data and code to and from the workers.

Control Random Number Streams on Workers

The random number generation functions rand, randi, and randn behave differently for parallel calculations compared to your MATLAB client.

Send Deep Learning Batch Job to Cluster

This example shows how to send deep learning training batch jobs to a cluster so that you can continue working or close MATLAB during training.

Concepts

Job Monitor

Manage your jobs using the Job Monitor