Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

How to specify arguments to the entrypoint in GCP batch configuration file?

I can specify the entrypoint key with:

```

"entrypoint": ""

```

 

But, how do I specify arguments (e.g "script.py") to the entrypoint? I searched for terms like "google cloud batch json config file" and could not find any relevant results.

5 1 332
1 REPLY 1

Hello there,

To specify arguments to it, you could use the `commands` field.

Please take a look at the reference doc: https://cloud.google.com/batch/docs/reference/rest/v1alpha/projects.locations.jobs#container

And an simple example:

https://cloud.google.com/batch/docs/samples/batch-create-container-job?hl=en#batch_create_container_...

 

Thanks!