Google Cloud Batch V1 Client - Class Runnable (0.2.2)

Reference documentation and code samples for the Google Cloud Batch V1 Client class Runnable.

Runnable describes instructions for executing a specific script or container as part of a Task.

Generated from protobuf message google.cloud.batch.v1.Runnable

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ container Google\Cloud\Batch\V1\Runnable\Container

Container runnable.

↳ script Google\Cloud\Batch\V1\Runnable\Script

Script runnable.

↳ barrier Google\Cloud\Batch\V1\Runnable\Barrier

Barrier runnable.

↳ ignore_exit_status bool

Normally, a non-zero exit status causes the Task to fail. This flag allows execution of other Runnables to continue instead.

↳ background bool

This flag allows a Runnable to continue running in the background while the Task executes subsequent Runnables. This is useful to provide services to other Runnables (or to provide debugging support tools like SSH servers).

↳ always_run bool

By default, after a Runnable fails, no further Runnable are executed. This flag indicates that this Runnable must be run even if the Task has already failed. This is useful for Runnables that copy output files off of the VM or for debugging. The always_run flag does not override the Task's overall max_run_duration. If the max_run_duration has expired then no further Runnables will execute, not even always_run Runnables.

↳ environment Google\Cloud\Batch\V1\Environment

Environment variables for this Runnable (overrides variables set for the whole Task or TaskGroup).

↳ timeout Google\Protobuf\Duration

Timeout for this Runnable.

getContainer

Container runnable.

Generated from protobuf field .google.cloud.batch.v1.Runnable.Container container = 1;

Returns
TypeDescription
Google\Cloud\Batch\V1\Runnable\Container|null

hasContainer

setContainer

Container runnable.

Generated from protobuf field .google.cloud.batch.v1.Runnable.Container container = 1;

Parameter
NameDescription
var Google\Cloud\Batch\V1\Runnable\Container
Returns
TypeDescription
$this

getScript

Script runnable.

Generated from protobuf field .google.cloud.batch.v1.Runnable.Script script = 2;

Returns
TypeDescription
Google\Cloud\Batch\V1\Runnable\Script|null

hasScript

setScript

Script runnable.

Generated from protobuf field .google.cloud.batch.v1.Runnable.Script script = 2;

Parameter
NameDescription
var Google\Cloud\Batch\V1\Runnable\Script
Returns
TypeDescription
$this

getBarrier

Barrier runnable.

Generated from protobuf field .google.cloud.batch.v1.Runnable.Barrier barrier = 6;

Returns
TypeDescription
Google\Cloud\Batch\V1\Runnable\Barrier|null

hasBarrier

setBarrier

Barrier runnable.

Generated from protobuf field .google.cloud.batch.v1.Runnable.Barrier barrier = 6;

Parameter
NameDescription
var Google\Cloud\Batch\V1\Runnable\Barrier
Returns
TypeDescription
$this

getIgnoreExitStatus

Normally, a non-zero exit status causes the Task to fail. This flag allows execution of other Runnables to continue instead.

Generated from protobuf field bool ignore_exit_status = 3;

Returns
TypeDescription
bool

setIgnoreExitStatus

Normally, a non-zero exit status causes the Task to fail. This flag allows execution of other Runnables to continue instead.

Generated from protobuf field bool ignore_exit_status = 3;

Parameter
NameDescription
var bool
Returns
TypeDescription
$this

getBackground

This flag allows a Runnable to continue running in the background while the Task executes subsequent Runnables. This is useful to provide services to other Runnables (or to provide debugging support tools like SSH servers).

Generated from protobuf field bool background = 4;

Returns
TypeDescription
bool

setBackground

This flag allows a Runnable to continue running in the background while the Task executes subsequent Runnables. This is useful to provide services to other Runnables (or to provide debugging support tools like SSH servers).

Generated from protobuf field bool background = 4;

Parameter
NameDescription
var bool
Returns
TypeDescription
$this

getAlwaysRun

By default, after a Runnable fails, no further Runnable are executed. This flag indicates that this Runnable must be run even if the Task has already failed. This is useful for Runnables that copy output files off of the VM or for debugging.

The always_run flag does not override the Task's overall max_run_duration. If the max_run_duration has expired then no further Runnables will execute, not even always_run Runnables.

Generated from protobuf field bool always_run = 5;

Returns
TypeDescription
bool

setAlwaysRun

By default, after a Runnable fails, no further Runnable are executed. This flag indicates that this Runnable must be run even if the Task has already failed. This is useful for Runnables that copy output files off of the VM or for debugging.

The always_run flag does not override the Task's overall max_run_duration. If the max_run_duration has expired then no further Runnables will execute, not even always_run Runnables.

Generated from protobuf field bool always_run = 5;

Parameter
NameDescription
var bool
Returns
TypeDescription
$this

getEnvironment

Environment variables for this Runnable (overrides variables set for the whole Task or TaskGroup).

Generated from protobuf field .google.cloud.batch.v1.Environment environment = 7;

Returns
TypeDescription
Google\Cloud\Batch\V1\Environment|null

hasEnvironment

clearEnvironment

setEnvironment

Environment variables for this Runnable (overrides variables set for the whole Task or TaskGroup).

Generated from protobuf field .google.cloud.batch.v1.Environment environment = 7;

Parameter
NameDescription
var Google\Cloud\Batch\V1\Environment
Returns
TypeDescription
$this

getTimeout

Timeout for this Runnable.

Generated from protobuf field .google.protobuf.Duration timeout = 8;

Returns
TypeDescription
Google\Protobuf\Duration|null

hasTimeout

clearTimeout

setTimeout

Timeout for this Runnable.

Generated from protobuf field .google.protobuf.Duration timeout = 8;

Parameter
NameDescription
var Google\Protobuf\Duration
Returns
TypeDescription
$this

getExecutable

Returns
TypeDescription
string