HEX
Server: Apache/2.4.65 (Ubuntu)
System: Linux ielts-store-v2 6.8.0-1036-gcp #38~22.04.1-Ubuntu SMP Thu Aug 14 01:19:18 UTC 2025 x86_64
User: root (0)
PHP: 7.2.34-54+ubuntu20.04.1+deb.sury.org+1
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Upload Files
File: //snap/google-cloud-cli/396/help/man/man1/gcloud_beta_batch_jobs_submit.1
.TH "GCLOUD_BETA_BATCH_JOBS_SUBMIT" 1



.SH "NAME"
.HP
gcloud beta batch jobs submit \- submit a Batch job



.SH "SYNOPSIS"
.HP
\f5gcloud beta batch jobs submit\fR [[\fIJOB\fR]\ \fB\-\-location\fR=\fILOCATION\fR] (\fB\-\-config\fR=\fIPATH_TO_FILE\fR\ \fB\-\-container\-commands\-file\fR=\fICONTAINER_COMMANDS_FILE\fR\ \fB\-\-container\-entrypoint\fR=\fICONTAINER_ENTRYPOINT\fR\ \fB\-\-container\-image\-uri\fR=\fICONTAINER_IMAGE_URI\fR\ |\ \fB\-\-script\-file\-path\fR=\fISCRIPT_FILE_PATH\fR\ |\ \fB\-\-script\-text\fR=\fISCRIPT_TEXT\fR) [\fB\-\-job\-prefix\fR=\fIJOB_PREFIX\fR] [\fB\-\-machine\-type\fR=\fIMACHINE_TYPE\fR] [\fB\-\-priority\fR=\fIPRIORITY\fR] [\fB\-\-provisioning\-model\fR=\fIPROVISIONING_MODEL\fR] [\fB\-\-network\fR=\fINETWORK\fR\ \fB\-\-subnetwork\fR=\fISUBNETWORK\fR\ :\ \fB\-\-no\-external\-ip\-address\fR] [\fIGCLOUD_WIDE_FLAG\ ...\fR]



.SH "DESCRIPTION"

\fB(BETA)\fR This command creates and submits a Batch job. After you create and
submit the job, Batch automatically queues, schedules, and executes it.



.SH "EXAMPLES"

To submit a job with a sample JSON configuration file (config.json) and name
\f5projects/foo/locations/us\-central1/jobs/bar\fR, run:

.RS 2m
$ gcloud beta batch jobs submit \e
    projects/foo/locations/us\-central1/jobs/bar \-\-config=config.json
.RE

To submit a job with a sample YAML configuration file (config.yaml) and name
projects/foo/locations/us\-central1/jobs/bar, run:

.RS 2m
$ gcloud beta batch jobs submit \e
    projects/foo/locations/us\-central1/jobs/bar \-\-config=config.yaml
.RE

To submit a job through stdin with a sample job configuration and name
\f5projects/foo/locations/us\-central1/jobs/bar\fR, run:

.RS 2m
$ gcloud beta batch jobs submit \e
    projects/foo/locations/us\-central1/jobs/bar \-\-config=\-
.RE

.RS 2m
then input json job config via stdin
{
  job config
}
.RE

To submit a job through HereDoc with a sample job configuration and name
\f5projects/foo/locations/us\-central1/jobs/bar\fR, run:

.RS 2m
$ gcloud beta batch jobs submit \e
    projects/foo/locations/us\-central1/jobs/bar \-\-config=\- << EOF
.RE

.RS 2m
{
  job config
}
EOF
.RE

For details about how to define a job's configuration using JSON, see the
projects.locations.jobs resource in the Batch API Reference. If you want to
define a job's configuration using YAML, convert the JSON syntax to YAML.



.SH "POSITIONAL ARGUMENTS"

.RS 2m
.TP 2m

Job resource \- The Batch job resource. If \-\-location not specified,the
current batch/location is used. The arguments in this group can be used to
specify the attributes of this resource. (NOTE) Some attributes are not given
arguments in this group but can be set in other ways.

To set the \f5project\fR attribute:
.RS 2m
.IP "\(em" 2m
provide the argument \f5JOB\fR on the command line with a fully specified name;
.IP "\(em" 2m
job ID is optional and will be generated if not specified with a fully specified
name;
.IP "\(em" 2m
provide the argument \f5\-\-project\fR on the command line;
.IP "\(em" 2m
set the property \f5core/project\fR.
.RE
.sp


.RS 2m
.TP 2m
[\fIJOB\fR]

ID of the job or fully qualified identifier for the job.

To set the \f5job\fR attribute:
.RS 2m
.IP "\(bu" 2m
provide the argument \f5JOB\fR on the command line;
.IP "\(bu" 2m
job ID is optional and will be generated if not specified.
.RE
.sp

.TP 2m
\fB\-\-location\fR=\fILOCATION\fR

Google Cloud location for the job.

To set the \f5location\fR attribute:
.RS 2m
.IP "\(bu" 2m
provide the argument \f5JOB\fR on the command line with a fully specified name;
.IP "\(bu" 2m
job ID is optional and will be generated if not specified with a fully specified
name;
.IP "\(bu" 2m
provide the argument \f5\-\-location\fR on the command line;
.IP "\(bu" 2m
set the property \f5batch/location\fR.
.RE
.sp


.RE
.RE
.sp

.SH "REQUIRED FLAGS"

.RS 2m
.TP 2m

At least one of these must be specified:


.RS 2m
.TP 2m
\fB\-\-config\fR=\fIPATH_TO_FILE\fR

The file path of the job config file in either JSON or YAML format. It also
supports direct input from stdin with '\-' or HereDoc (in shells with HereDoc
support like Bash) with '\- <<DELIMITER'.

Use a full or relative path to a local file containing the value of config.

.TP 2m

Either specify the config file for the job or the first runnable in the task
spec. Specify either a script file or container arguments for the first runnable
in the task spec.

At most one of these can be specified:


.RS 2m
.TP 2m

Options to specify the container arguments for the first runnable in the task
spec.


.RS 2m
.TP 2m
\fB\-\-container\-commands\-file\fR=\fICONTAINER_COMMANDS_FILE\fR

Overrides the \f5CMD\fR specified in the container. If there is an ENTRYPOINT
(either in the container image or with the entrypoint field below) then commands
are appended as arguments to the ENTRYPOINT.

.TP 2m
\fB\-\-container\-entrypoint\fR=\fICONTAINER_ENTRYPOINT\fR

Overrides the \f5ENTRYPOINT\fR specified in the container.

.TP 2m
\fB\-\-container\-image\-uri\fR=\fICONTAINER_IMAGE_URI\fR

The URI to pull the container image from.

.RE
.sp
.TP 2m

Either specify a path to a script file to run or provide inline text to execute
directly.

At most one of these can be specified:


.RS 2m
.TP 2m
\fB\-\-script\-file\-path\fR=\fISCRIPT_FILE_PATH\fR

Path to script file to run as first runnable in task spec. File path should be a
valid path on the instance volume.

.TP 2m
\fB\-\-script\-text\fR=\fISCRIPT_TEXT\fR

Text to run as first runnable in task spec.


.RE
.RE
.RE
.RE
.sp

.SH "OPTIONAL FLAGS"

.RS 2m
.TP 2m
\fB\-\-job\-prefix\fR=\fIJOB_PREFIX\fR

Specify the job prefix. A job ID in the format of job prefix + %Y%m%d\-%H%M%S
will be generated. Note that job prefix cannot be specified while JOB ID
positional argument is specified.

.TP 2m
\fB\-\-machine\-type\fR=\fIMACHINE_TYPE\fR

Specify the Compute Engine machine type, for example, e2\-standard\-4. Currently
only one machine type is supported.

.TP 2m
\fB\-\-priority\fR=\fIPRIORITY\fR

Job priority [0\-99] 0 is the lowest priority.

.TP 2m
\fB\-\-provisioning\-model\fR=\fIPROVISIONING_MODEL\fR

Specify the allowed provisioning model for the compute instances.
\fIPROVISIONING_MODEL\fR must be one of:

.RS 2m
.TP 2m
\fBSPOT\fR
The SPOT VM provisioning model. Ideal for fault\-tolerant workloads that can
withstand preemption.
.TP 2m
\fBSTANDARD\fR
The STANDARD VM provisioning model
.RE
.sp


.TP 2m
\fB\-\-network\fR=\fINETWORK\fR

The URL for the network resource. Must specify subnetwork as well if network is
specified

.TP 2m
\fB\-\-subnetwork\fR=\fISUBNETWORK\fR

The URL for the subnetwork resource. Must specify network as well if subnetwork
is specified

.TP 2m
\fB\-\-no\-external\-ip\-address\fR

Required if no external public IP address is attached to the VM. If no external
public IP address, additional configuration is required to allow the VM to
access Google Services.


.RE
.sp

.SH "GCLOUD WIDE FLAGS"

These flags are available to all commands: \-\-access\-token\-file, \-\-account,
\-\-billing\-project, \-\-configuration, \-\-flags\-file, \-\-flatten,
\-\-format, \-\-help, \-\-impersonate\-service\-account, \-\-log\-http,
\-\-project, \-\-quiet, \-\-trace\-token, \-\-user\-output\-enabled,
\-\-verbosity.

Run \fB$ gcloud help\fR for details.



.SH "NOTES"

This command is currently in beta and might change without notice. These
variants are also available:

.RS 2m
$ gcloud batch jobs submit
.RE

.RS 2m
$ gcloud alpha batch jobs submit
.RE