public sealed class Runnable.Types.Script : IMessage<Runnable.Types.Script>, IEquatable<Runnable.Types.Script>, IDeepCloneable<Runnable.Types.Script>, IBufferMessage, IMessage
Reference documentation and code samples for the Batch v1 API class Runnable.Types.Script.
The path to a script file that is accessible from the host VM(s).
Unless the script file supports the default #!/bin/sh shell
interpreter, you must specify an interpreter by including a
[shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix) as the
first line of the file. For example, to execute the script using bash,
include #!/bin/bash as the first line of the file. Alternatively,
to execute the script using Python3, include #!/usr/bin/env python3
as the first line of the file.
Unless the script text supports the default #!/bin/sh shell
interpreter, you must specify an interpreter by including a
[shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix) at the
beginning of the text. For example, to execute the script using bash,
include #!/bin/bash\n at the beginning of the text. Alternatively,
to execute the script using Python3, include #!/usr/bin/env python3\n
at the beginning of the text.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThis document provides reference documentation for the \u003ccode\u003eRunnable.Types.Script\u003c/code\u003e class within the Google Cloud Batch v1 API, which is used for defining script runnables.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eRunnable.Types.Script\u003c/code\u003e class can be instantiated with either a file path or script text, as defined by the \u003ccode\u003ePath\u003c/code\u003e and \u003ccode\u003eText\u003c/code\u003e properties, respectively.\u003c/p\u003e\n"],["\u003cp\u003eThere are 18 versions of the Batch v1 API class \u003ccode\u003eRunnable.Types.Script\u003c/code\u003e, with the latest version being 2.13.0.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eRunnable.Types.Script\u003c/code\u003e class implements several interfaces, including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe class has the following properties: \u003ccode\u003eCommandCase\u003c/code\u003e, \u003ccode\u003eHasPath\u003c/code\u003e, \u003ccode\u003eHasText\u003c/code\u003e, \u003ccode\u003ePath\u003c/code\u003e, and \u003ccode\u003eText\u003c/code\u003e, which are all defined in this document.\u003c/p\u003e\n"]]],[],null,["# Batch v1 API - Class Runnable.Types.Script (2.13.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.13.0 (latest)](/dotnet/docs/reference/Google.Cloud.Batch.V1/latest/Google.Cloud.Batch.V1.Runnable.Types.Script)\n- [2.12.0](/dotnet/docs/reference/Google.Cloud.Batch.V1/2.12.0/Google.Cloud.Batch.V1.Runnable.Types.Script)\n- [2.11.0](/dotnet/docs/reference/Google.Cloud.Batch.V1/2.11.0/Google.Cloud.Batch.V1.Runnable.Types.Script)\n- [2.10.0](/dotnet/docs/reference/Google.Cloud.Batch.V1/2.10.0/Google.Cloud.Batch.V1.Runnable.Types.Script)\n- [2.9.0](/dotnet/docs/reference/Google.Cloud.Batch.V1/2.9.0/Google.Cloud.Batch.V1.Runnable.Types.Script)\n- [2.8.0](/dotnet/docs/reference/Google.Cloud.Batch.V1/2.8.0/Google.Cloud.Batch.V1.Runnable.Types.Script)\n- [2.7.0](/dotnet/docs/reference/Google.Cloud.Batch.V1/2.7.0/Google.Cloud.Batch.V1.Runnable.Types.Script)\n- [2.6.0](/dotnet/docs/reference/Google.Cloud.Batch.V1/2.6.0/Google.Cloud.Batch.V1.Runnable.Types.Script)\n- [2.5.0](/dotnet/docs/reference/Google.Cloud.Batch.V1/2.5.0/Google.Cloud.Batch.V1.Runnable.Types.Script)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.Batch.V1/2.4.0/Google.Cloud.Batch.V1.Runnable.Types.Script)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.Batch.V1/2.3.0/Google.Cloud.Batch.V1.Runnable.Types.Script)\n- [2.2.0](/dotnet/docs/reference/Google.Cloud.Batch.V1/2.2.0/Google.Cloud.Batch.V1.Runnable.Types.Script)\n- [2.1.0](/dotnet/docs/reference/Google.Cloud.Batch.V1/2.1.0/Google.Cloud.Batch.V1.Runnable.Types.Script)\n- [2.0.0](/dotnet/docs/reference/Google.Cloud.Batch.V1/2.0.0/Google.Cloud.Batch.V1.Runnable.Types.Script)\n- [1.3.0](/dotnet/docs/reference/Google.Cloud.Batch.V1/1.3.0/Google.Cloud.Batch.V1.Runnable.Types.Script)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.Batch.V1/1.2.0/Google.Cloud.Batch.V1.Runnable.Types.Script)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.Batch.V1/1.1.0/Google.Cloud.Batch.V1.Runnable.Types.Script)\n- [1.0.0](/dotnet/docs/reference/Google.Cloud.Batch.V1/1.0.0/Google.Cloud.Batch.V1.Runnable.Types.Script) \n\n public sealed class Runnable.Types.Script : IMessage\u003cRunnable.Types.Script\u003e, IEquatable\u003cRunnable.Types.Script\u003e, IDeepCloneable\u003cRunnable.Types.Script\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Batch v1 API class Runnable.Types.Script.\n\nScript runnable. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e Runnable.Types.Script \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[Runnable](/dotnet/docs/reference/Google.Cloud.Batch.V1/latest/Google.Cloud.Batch.V1.Runnable)[Types](/dotnet/docs/reference/Google.Cloud.Batch.V1/latest/Google.Cloud.Batch.V1.Runnable.Types)[Script](/dotnet/docs/reference/Google.Cloud.Batch.V1/latest/Google.Cloud.Batch.V1.Runnable.Types.Script), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[Runnable](/dotnet/docs/reference/Google.Cloud.Batch.V1/latest/Google.Cloud.Batch.V1.Runnable)[Types](/dotnet/docs/reference/Google.Cloud.Batch.V1/latest/Google.Cloud.Batch.V1.Runnable.Types)[Script](/dotnet/docs/reference/Google.Cloud.Batch.V1/latest/Google.Cloud.Batch.V1.Runnable.Types.Script), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[Runnable](/dotnet/docs/reference/Google.Cloud.Batch.V1/latest/Google.Cloud.Batch.V1.Runnable)[Types](/dotnet/docs/reference/Google.Cloud.Batch.V1/latest/Google.Cloud.Batch.V1.Runnable.Types)[Script](/dotnet/docs/reference/Google.Cloud.Batch.V1/latest/Google.Cloud.Batch.V1.Runnable.Types.Script), [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) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Batch.V1](/dotnet/docs/reference/Google.Cloud.Batch.V1/latest/Google.Cloud.Batch.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.Batch.V1.dll\n\nConstructors\n------------\n\n### Script()\n\n public Script()\n\n### Script(Script)\n\n public Script(Runnable.Types.Script other)\n\nProperties\n----------\n\n### CommandCase\n\n public Runnable.Types.Script.CommandOneofCase CommandCase { get; }\n\n### HasPath\n\n public bool HasPath { get; }\n\nGets whether the \"path\" field is set\n\n### HasText\n\n public bool HasText { get; }\n\nGets whether the \"text\" field is set\n\n### Path\n\n public string Path { get; set; }\n\nThe path to a script file that is accessible from the host VM(s).\n\nUnless the script file supports the default `#!/bin/sh` shell\ninterpreter, you must specify an interpreter by including a\n\\[shebang line\\](\u003chttps://en.wikipedia.org/wiki/Shebang_(Unix\u003e) as the\nfirst line of the file. For example, to execute the script using bash,\ninclude `#!/bin/bash` as the first line of the file. Alternatively,\nto execute the script using Python3, include `#!/usr/bin/env python3`\nas the first line of the file.\n\n### Text\n\n public string Text { get; set; }\n\nThe text for a script.\n\nUnless the script text supports the default `#!/bin/sh` shell\ninterpreter, you must specify an interpreter by including a\n\\[shebang line\\](\u003chttps://en.wikipedia.org/wiki/Shebang_(Unix\u003e) at the\nbeginning of the text. For example, to execute the script using bash,\ninclude `#!/bin/bash\\n` at the beginning of the text. Alternatively,\nto execute the script using Python3, include `#!/usr/bin/env python3\\n`\nat the beginning of the text."]]