Main Content

remotemjs

(Removed) Execute mjs command on one or more remote hosts by transport protocol

remotemjs has been removed. Use ssh instead. For more information, see Version History.

Syntax

remotemjs <mjs options> <flags> <protocol options>

Description

remotemjs <mjs options> <flags> <protocol options> allows you to execute the mjs service on one or more remote hosts.

For a description of the mjs service, see the mjs reference page.

The following table describes the supported flags and options. You can combined multiple flags in the same command, preceding each flag by a dash (-).

Flags and OptionsOperation
<mjs options>Options and arguments of the mjs command, such as start, stop, etc. See the mjs reference page for a full list.
-matlabroot <installfoldername>The MATLAB® installation folder on the remote hosts, required only if the remote installation folder differs from the one on the local machine.
-remotehost host1[,host2[,...]The names of the hosts where you want to run the mjs command. Separate the host names by commas without any white spaces. This is a mandatory argument.
-remoteplatform { unix | windows } The platform of the remote hosts. This option is required only if different from the local platform.
-quietPrevent mjs from prompting the user for missing information. The command fails if all required information is not specified.
-helpPrint help information.
-protocol <type>

Force the usage of a particular protocol type. Specifying a protocol type with all its required parameters also avoids interactive prompting and allows for use in scripts.

The supported protocol types are ssh and winsc.

To get more information about one particular protocol type, enter

remotemjs -protocol <type> -help

For example:

remotemjs -protocol winsc -help

Using the winsc protocol requires that you log in as a user with admin privileges on the remote host.

<protocol options>Specify particular options for the protocol type being used.

Note

If you are using OpenSSH on a Microsoft® Windows® operating system, you can encounter a problem when using backslashes in path names for your command options. In most cases, you can work around this problem by using forward slashes instead. For example, to specify the file C:\temp\mjs_def.bat, you should identify it as C:/temp/mjs_def.bat.

Examples

Start mjs on three remote machines of the same platform as the client:

remotemjs start -remotehost hostA,hostB,hostC

Start mjs in a clean state on two UNIX® operating system machines from a Windows operating system machine, using the ssh protocol. Enter the following command on a single line:

remotemjs start -clean -matlabroot /usr/local/matlab
 -remotehost unixHost1,unixHost2 -remoteplatform UNIX
 -protocol ssh

Version History

expand all

R2022b: remotemjs has been removed

remotemjs is no longer supported.

Previously you used remotemjs to run MATLAB Job Scheduler commands on a remote host using -protocol ssh or -protocol winsc.

The following table details how to use ssh instead.

ErrorsRecommended
remotemjs <mjs options> -matlabroot <installfoldername> -remotehost host1
ssh host1 <installfoldername>/toolbox/parallel/bin/mjs <mjs options>
remotemjs <mjs options> -matlabroot <installfoldername> -remotehost host1,host2
ssh host1 <installfoldername>/toolbox/parallel/bin/mjs <mjs options>
ssh host2 <installfoldername>/toolbox/parallel/bin/mjs <mjs options>

See Also