Reference documentation and code samples for the Google Cloud PHP shared dependency, providing functionality useful to all components. Client class SimpleJob.
Represents a simple job that runs a single method that loops forever.
Namespace
Google \ Cloud \ Core \ Batch
Methods
__construct
Creates a new Simple Job.
Parameters
Name
Description
identifier
string
Unique identifier of the job.
func
callable
Any Callable except for Closure. The callable
should not accept arguments and should loop forever.
id
int
The job id.
options
array
Configuration options.
↳ bootstrapFile
string
A file to load before executing the job. It's needed for registering global functions.
↳ numWorkers
int
The number of workers for this job.
run
Runs the job loop. This is expected to be a blocking call.
[[["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 PHP shared dependency, providing functionality useful to all components. Client - Class SimpleJob (1.64.2)\n\nVersion latestkeyboard_arrow_down\n\n- [1.64.2 (latest)](/php/docs/reference/cloud-core/latest/Batch.SimpleJob)\n- [1.64.1](/php/docs/reference/cloud-core/1.64.1/Batch.SimpleJob)\n- [1.63.0](/php/docs/reference/cloud-core/1.63.0/Batch.SimpleJob)\n- [1.62.3](/php/docs/reference/cloud-core/1.62.3/Batch.SimpleJob)\n- [1.61.0](/php/docs/reference/cloud-core/1.61.0/Batch.SimpleJob)\n- [1.60.1](/php/docs/reference/cloud-core/1.60.1/Batch.SimpleJob)\n- [1.59.1](/php/docs/reference/cloud-core/1.59.1/Batch.SimpleJob)\n- [1.58.2](/php/docs/reference/cloud-core/1.58.2/Batch.SimpleJob)\n- [1.53.0](/php/docs/reference/cloud-core/1.53.0/Batch.SimpleJob)\n- [1.52.11](/php/docs/reference/cloud-core/1.52.11/Batch.SimpleJob)\n- [1.51.2](/php/docs/reference/cloud-core/1.51.2/Batch.SimpleJob)\n- [1.50.0](/php/docs/reference/cloud-core/1.50.0/Batch.SimpleJob)\n- [1.49.3](/php/docs/reference/cloud-core/1.49.3/Batch.SimpleJob)\n- [1.48.1](/php/docs/reference/cloud-core/1.48.1/Batch.SimpleJob) \n| **Beta**\n|\n|\n| This library is covered by the [Pre-GA Offerings Terms](/terms/service-terms#1)\n| of the Terms of Service. Pre-GA libraries might have limited support,\n| and changes to pre-GA libraries might not be compatible with other pre-GA versions.\n| For more information, see the\n[launch stage descriptions](/products#product-launch-stages). \nReference documentation and code samples for the Google Cloud PHP shared dependency, providing functionality useful to all components. Client class SimpleJob.\n\nRepresents a simple job that runs a single method that loops forever.\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Core \\\\ Batch\n\nMethods\n-------\n\n### __construct\n\nCreates a new Simple Job.\n\n### run\n\nRuns the job loop. This is expected to be a blocking call."]]