Reference documentation and code samples for the Google Cloud Batch V1 Client class Script.
Script runnable.
Generated from protobuf message google.cloud.batch.v1.Runnable.Script
Namespace
Google \ Cloud \ Batch \ V1 \ Runnable
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ path
string
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.
↳ text
string
The text for a script. 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.
getPath
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.
Returns
Type
Description
string
hasPath
setPath
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.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getText
The text for a script.
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.
Returns
Type
Description
string
hasText
setText
The text for a script.
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"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Cloud Batch V1 Client - Class Script (1.2.2)\n\nVersion latestkeyboard_arrow_down\n\n- [1.2.2 (latest)](/php/docs/reference/cloud-batch/latest/V1.Runnable.Script)\n- [1.2.1](/php/docs/reference/cloud-batch/1.2.1/V1.Runnable.Script)\n- [1.1.7](/php/docs/reference/cloud-batch/1.1.7/V1.Runnable.Script)\n- [1.0.3](/php/docs/reference/cloud-batch/1.0.3/V1.Runnable.Script)\n- [0.17.0](/php/docs/reference/cloud-batch/0.17.0/V1.Runnable.Script)\n- [0.16.10](/php/docs/reference/cloud-batch/0.16.10/V1.Runnable.Script)\n- [0.15.0](/php/docs/reference/cloud-batch/0.15.0/V1.Runnable.Script)\n- [0.14.0](/php/docs/reference/cloud-batch/0.14.0/V1.Runnable.Script)\n- [0.13.1](/php/docs/reference/cloud-batch/0.13.1/V1.Runnable.Script)\n- [0.12.1](/php/docs/reference/cloud-batch/0.12.1/V1.Runnable.Script)\n- [0.11.3](/php/docs/reference/cloud-batch/0.11.3/V1.Runnable.Script)\n- [0.10.0](/php/docs/reference/cloud-batch/0.10.0/V1.Runnable.Script)\n- [0.9.0](/php/docs/reference/cloud-batch/0.9.0/V1.Runnable.Script)\n- [0.8.0](/php/docs/reference/cloud-batch/0.8.0/V1.Runnable.Script)\n- [0.7.0](/php/docs/reference/cloud-batch/0.7.0/V1.Runnable.Script)\n- [0.6.0](/php/docs/reference/cloud-batch/0.6.0/V1.Runnable.Script)\n- [0.5.2](/php/docs/reference/cloud-batch/0.5.2/V1.Runnable.Script)\n- [0.4.0](/php/docs/reference/cloud-batch/0.4.0/V1.Runnable.Script)\n- [0.3.0](/php/docs/reference/cloud-batch/0.3.0/V1.Runnable.Script)\n- [0.2.2](/php/docs/reference/cloud-batch/0.2.2/V1.Runnable.Script) \nReference documentation and code samples for the Google Cloud Batch V1 Client class Script.\n\nScript runnable.\n\nGenerated from protobuf message `google.cloud.batch.v1.Runnable.Script`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Batch \\\\ V1 \\\\ Runnable\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getPath\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### hasPath\n\n### setPath\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### getText\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.\n\n### hasText\n\n### setText\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.\n\n### getCommand"]]