0.22.5 (latest) 0.22.4 0.21.0 0.20.0 0.19.0 0.18.0 0.17.37 0.16.0 0.15.0 0.14.0 0.13.0 0.12.0 0.11.0 0.10.0 0.9.0 0.8.1 0.7.0 0.6.0 0.5.0 0.4.1 0.3.2 0.2.0 0.1.2

    Runnable(mapping=None, *, ignore_unknown_fields=False, **kwargs)

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

This message has `oneof`_ fields (mutually exclusive fields).
For each oneof, at most one member field can be set at the same time.
Setting any member of the oneof automatically clears all other
members.

.. _oneof: <https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields>

| ## Attributes ||
|---|---|
| **Name** | **Description** |
| `container` | `https://docs.cloud.google.com/python/docs/reference/batch/latest/google.cloud.batch_v1.types.Runnable.Container` Container runnable. This field is a member of `oneof`_ `executable`. |
| `script` | `https://docs.cloud.google.com/python/docs/reference/batch/latest/google.cloud.batch_v1.types.Runnable.Script` Script runnable. This field is a member of `oneof`_ `executable`. |
| `barrier` | `https://docs.cloud.google.com/python/docs/reference/batch/latest/google.cloud.batch_v1.types.Runnable.Barrier` Barrier runnable. This field is a member of `oneof`_ `executable`. |
| `display_name` | `str` 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. |
| `ignore_exit_status` | `bool` 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. |
| `background` | `bool` 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. |
| `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` | `https://docs.cloud.google.com/python/docs/reference/batch/latest/google.cloud.batch_v1.types.Environment` Environment variables for this Runnable (overrides variables set for the whole Task or TaskGroup). |
| `timeout` | `google.protobuf.duration_pb2.Duration` Timeout for this Runnable. |
| `labels` | `MutableMapping[str, str]` Labels for this Runnable. |

## Classes

### Barrier

    Barrier(mapping=None, *, ignore_unknown_fields=False, **kwargs)

A barrier runnable automatically blocks the execution of
subsequent runnables until all the tasks in the task group reach
the barrier.

### Container

    Container(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Container runnable.

### LabelsEntry

    LabelsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

The abstract base class for a message.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `kwargs` | `dict` Keys and values corresponding to the fields of the message. |
| `mapping` | ``Union[dict, `.Message`]`` A dictionary or message to be used to determine the values for this message. |
| `ignore_unknown_fields` | `Optional(bool)` If True, do not raise errors for unknown fields. Only applied if `mapping` is a mapping type or there are keyword parameters. |

### Script

    Script(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Script runnable.

This message has `oneof`_ fields (mutually exclusive fields).
For each oneof, at most one member field can be set at the same time.
Setting any member of the oneof automatically clears all other
members.

.. _oneof: <https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields>