# Batch v1 API - Class TaskExecution (2.15.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [2.15.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/latest/Google.Cloud.Batch.V1.TaskExecution)
- [2.14.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/2.14.0/Google.Cloud.Batch.V1.TaskExecution)
- [2.13.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/2.13.0/Google.Cloud.Batch.V1.TaskExecution)
- [2.12.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/2.12.0/Google.Cloud.Batch.V1.TaskExecution)
- [2.11.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/2.11.0/Google.Cloud.Batch.V1.TaskExecution)
- [2.10.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/2.10.0/Google.Cloud.Batch.V1.TaskExecution)
- [2.9.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/2.9.0/Google.Cloud.Batch.V1.TaskExecution)
- [2.8.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/2.8.0/Google.Cloud.Batch.V1.TaskExecution)
- [2.7.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/2.7.0/Google.Cloud.Batch.V1.TaskExecution)
- [2.6.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/2.6.0/Google.Cloud.Batch.V1.TaskExecution)
- [2.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/2.5.0/Google.Cloud.Batch.V1.TaskExecution)
- [2.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/2.4.0/Google.Cloud.Batch.V1.TaskExecution)
- [2.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/2.3.0/Google.Cloud.Batch.V1.TaskExecution)
- [2.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/2.2.0/Google.Cloud.Batch.V1.TaskExecution)
- [2.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/2.1.0/Google.Cloud.Batch.V1.TaskExecution)
- [2.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/2.0.0/Google.Cloud.Batch.V1.TaskExecution)
- [1.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/1.3.0/Google.Cloud.Batch.V1.TaskExecution)
- [1.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/1.2.0/Google.Cloud.Batch.V1.TaskExecution)
- [1.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/1.1.0/Google.Cloud.Batch.V1.TaskExecution)
- [1.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/1.0.0/Google.Cloud.Batch.V1.TaskExecution)

    public sealed class TaskExecution : IMessage<TaskExecution>, IEquatable<TaskExecution>, IDeepCloneable<TaskExecution>, IBufferMessage, IMessage

Reference documentation and code samples for the Batch v1 API class TaskExecution.

This Task Execution field includes detail information for
task execution procedures, based on StatusEvent types.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> TaskExecution

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[TaskExecution](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/latest/Google.Cloud.Batch.V1.TaskExecution), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[TaskExecution](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/latest/Google.Cloud.Batch.V1.TaskExecution), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[TaskExecution](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/latest/Google.Cloud.Batch.V1.TaskExecution), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.Batch.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/latest/Google.Cloud.Batch.V1)

## Assembly

Google.Cloud.Batch.V1.dll

## Constructors

### TaskExecution()

    public TaskExecution()

### TaskExecution(TaskExecution)

    public TaskExecution(TaskExecution other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/latest/Google.Cloud.Batch.V1.TaskExecution` |

## Properties

### ExitCode

    public int ExitCode { get; set; }

The exit code of a finished task.

If the task succeeded, the exit code will be 0. If the task failed but not
due to the following reasons, the exit code will be 50000.

Otherwise, it can be from different sources:

- Batch known failures: <https://cloud.google.com/batch/docs/troubleshooting#reserved-exit-codes>.
- Batch runnable execution failures; you can rely on Batch logs to further diagnose: <https://cloud.google.com/batch/docs/analyze-job-using-logs>. If there are multiple runnables failures, Batch only exposes the first error.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int32` |   |