Skip to main content


How to use Start Delay

Use the Workflow Start Delay functionality if you need to delay the execution of the Workflow without the need for regular launches. Here you simply specify the time to wait before dispatching the first Workflow task.

$workflow = $workflowClient->newWorkflowStub(
$workflowClient->start($workflow, 'Hello world!');

How to use Temporal Cron Jobs

A Temporal Cron Job is the series of Workflow Executions that occur when a Cron Schedule is provided in the call to spawn a Workflow Execution.

A Cron Schedule is provided as an option when the call to spawn a Workflow Execution is made.

Set your Cron Schedule with CronSchedule('* * * * *').

The following example sets a Cron Schedule in PHP:

  $workflow = $this->workflowClient->newWorkflowStub(
->withCronSchedule('* * * * *')
// Execution timeout limits total time. Cron will stop executing after this timeout.
// Run timeout limits duration of a single workflow invocation.

$output->writeln("Starting <comment>CronWorkflow</comment>... ");

try {
$run = $this->workflowClient->start($workflow, 'Antony');
// ...

Setting withCronSchedule turns the Workflow Execution into a Temporal Cron Job. For more information, see the PHP samples for example code or the PHP SDK WorkflowOptions source code.