Class Runnable
Runnable describes instructions for executing a specific script or container as part of a Task.
Implements
Inherited Members
Namespace: Google.Apis.Batch.v1.Data
Assembly: Google.Apis.Batch.v1.dll
Syntax
public class Runnable : IDirectResponseSchema
Properties
AlwaysRun
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.
Declaration
[JsonProperty("alwaysRun")]
public virtual bool? AlwaysRun { get; set; }
Property Value
Type | Description |
---|---|
bool? |
Background
Normally, a runnable that doesn't exit causes its task to fail. However, you can set this field to true
to
configure a background runnable. Background runnables are allowed continue running in the background while
the task executes subsequent runnables. For example, background runnables are useful for providing services
to other runnables or providing debugging-support tools like SSH servers. Specifically, background runnables
are killed automatically (if they have not already exited) a short time after all foreground runnables have
completed. Even though this is likely to result in a non-zero exit status for the background runnable, these
automatic kills are not treated as task failures.
Declaration
[JsonProperty("background")]
public virtual bool? Background { get; set; }
Property Value
Type | Description |
---|---|
bool? |
Barrier
Barrier runnable.
Declaration
[JsonProperty("barrier")]
public virtual Barrier Barrier { get; set; }
Property Value
Type | Description |
---|---|
Barrier |
Container
Container runnable.
Declaration
[JsonProperty("container")]
public virtual Container Container { get; set; }
Property Value
Type | Description |
---|---|
Container |
DisplayName
Optional. DisplayName is an optional field that can be provided by the caller. If provided, it will be used in logs and other outputs to identify the script, making it easier for users to understand the logs. If not provided the index of the runnable will be used for outputs.
Declaration
[JsonProperty("displayName")]
public virtual string DisplayName { get; set; }
Property Value
Type | Description |
---|---|
string |
ETag
The ETag of the item.
Declaration
public virtual string ETag { get; set; }
Property Value
Type | Description |
---|---|
string |
Environment
Environment variables for this Runnable (overrides variables set for the whole Task or TaskGroup).
Declaration
[JsonProperty("environment")]
public virtual Environment Environment { get; set; }
Property Value
Type | Description |
---|---|
Environment |
IgnoreExitStatus
Normally, a runnable that returns a non-zero exit status fails and causes the task to fail. However, you can
set this field to true
to allow the task to continue executing its other runnables even if this runnable
fails.
Declaration
[JsonProperty("ignoreExitStatus")]
public virtual bool? IgnoreExitStatus { get; set; }
Property Value
Type | Description |
---|---|
bool? |
Labels
Labels for this Runnable.
Declaration
[JsonProperty("labels")]
public virtual IDictionary<string, string> Labels { get; set; }
Property Value
Type | Description |
---|---|
IDictionary<string, string> |
Script
Script runnable.
Declaration
[JsonProperty("script")]
public virtual Script Script { get; set; }
Property Value
Type | Description |
---|---|
Script |
Timeout
Timeout for this Runnable.
Declaration
[JsonProperty("timeout")]
public virtual object Timeout { get; set; }
Property Value
Type | Description |
---|---|
object |