Main Content

shutdown

Shut down cloud cluster

Description

example

shutdown(cluster) shuts down the cluster immediately.

example

shutdown(MJScluster,'At',D) shuts down the cluster at the time specified by the datetime, datenum, or datevec D. D is interpreted in the local time zone of the MATLAB® client unless D is a datetime with a non-empty TimeZone property.

example

shutdown(MJScluster,'After',event) shuts down the cluster after the specified event event has occurred. event can be 'never' or 'idle'. A cluster is 'idle' immediately when there are no running jobs, queued jobs, or running pools. The cluster is eligible for shutdown if 'idle' for more than 5 minutes, and is guaranteed to shut down within 60 minutes.

example

shutdown(MJScluster,'After',numhours) shuts down the cluster after numhours hours, as measured from the time the method is called.

Examples

collapse all

shutdown(cluster);

Specify date and time to terminate a cluster using a datetime. If the datetime has an empty TimeZone property, the datetime is interpreted in the local time zone of the MATLAB client.

shutdown(MJSCluster,'At',datetime(2017, 2, 22, 19, 0, 0,'TimeZone','local');
shutdown(MJSCluster,'After','never');
shutdown(MJSCluster,'After','idle');
shutdown(MJSCluster,'After',10);

Input Arguments

collapse all

MATLAB Parallel Server for Amazon EC2® cluster, specified as cluster object created using parcluster.

Example: shutdown(cluster);

MATLAB Parallel Server for Amazon EC2 cluster, specified as cluster object created using parcluster.

Example: shutdown(MJScluster);

Date and time, specified as a datetime, datenum, or datevec. D is interpreted in the local time zone of the MATLAB client unless D is a datetime with a non-empty TimeZone property.

Example: shutdown(MJSCluster,'At',datetime(2017, 2, 22, 19, 0, 0,'TimeZone', 'local'));

Event to shut down the cluster, specified as 'never' or 'idle'. A cluster is 'idle' immediately when there are no running jobs, queued jobs, or running pools. The cluster is eligible for shutdown if 'idle' for more than 5 minutes, and is guaranteed to shut down within 60 minutes.

Example: shutdown(MJSCluster,'After','idle');

Number of hours after which the cluster shuts down, specified as scalar, measured from the time you call shutdown.

Example: shutdown(MJSCluster,'After',10);

Introduced in R2017a