Skip to content

Build Not yet confirmed elsewhere1 publisher 3 min read Published

Temporal's determinism rule forces the three-day wait out of your Laravel job class

A dev.to walkthrough hands a seven-day onboarding flow to a workflow engine on port 7233. The install is two lines; the part that reshapes your code is the rule that the orchestrator may never touch Eloquent.

The Engineer · Build desk

How we use AI Send a correction

What happened

  • The walkthrough works a six-step onboarding flow: welcome email, a three-day wait, a profile-picture check, a reminder, a further four-day wait, then flagging the account for manual sales outreach.
  • Its argument against doing this in plain Laravel jobs is that you write database state tracking, several delayed dispatch loops and manual retry intervals, and lose the user's step position if a server reboots.
  • Integration is a Composer install of the official Temporal PHP SDK plus a TEMPORAL_ADDRESS entry, which the tutorial points at 127.0.0.1:7233, the default for a local cluster.
  • Code is split in two: deterministic workflows that coordinate steps and sleeps but may not touch databases, external systems or random functions, and activities that do the queries, emails and API calls.

Why it matters

  • cost The bill adds a second durable system alongside the first: the Redis queues and supervisors already carrying ordinary jobs stay, and now an operations team owns a Temporal cluster too.
  • constraint You cannot lift an existing Job class across. Anything that both waits and queries has to be cut along the determinism line first, which makes migration a refactor of the code you trust least.
  • contradiction The prose sells queryable statuses and complex retries; the configuration shown sets one timeout. Anyone copying this file owns the retry policy and the status query themselves.
  • decision The choice is per-flow, not platform-wide, and the author's own caveat about multi-day state machines is the line to draw it on.

The rule barring the orchestrator from databases, external systems and random functions [1] serves a specific mechanical purpose, not a stylistic one. Nothing about coordinating steps needs it. It only makes sense if that function is expected to run more than once against a recorded history, with each `yield` resolving from something the server already knows. That is the mechanism behind the promise of guaranteed state progression [15]: the wait stops being a delayed job in Redis and becomes an event the cluster owns, and the PHP worker holding the process becomes disposable.

The two timescales in the sample show the seam. The workflow method yields `Workflow::timer(CarbonInterval::days(3))` [7]. The activity stub is constructed with a single option, `withStartToCloseTimeout(CarbonInterval::seconds(30))`, under a comment that calls it retry settings [6]. Three days is 259,200 seconds, so the orchestrator's shortest wait is 8,640 times the ceiling on one activity attempt [11]. That ratio is the point. Nothing in the worker needs to survive the gap, which is exactly the property the hand-rolled version lacks when a server reboots mid-process [14].

Adoption lands in two places. The runtime: a Composer install [4] plus a cluster for `TEMPORAL_ADDRESS` to point at [5]. The walkthrough does not cost that cluster out, and if Redis queues and supervisors are already handling millions of ordinary jobs for you [12], this is a second durable system rather than a replacement. The code: activities keep `User::findOrFail` and the `Mail` facade, resolved through Laravel's container [8], while the workflow keeps the timers and the branch [2]. Any existing job class that both sleeps and queries has to be cut along that line before it can move.

Then read the listing against the claim. Temporal is described as handling state persistence, timeouts, queryable statuses and complex retries [15]. The published code stops mid-identifier at `checkProfileS` [9], so the second timer and the sales-outreach escalation described in the flow [3] exist only in prose. Given the article's subject is keeping track of a user's progress through a flow, that gap is an ironic failure mode to leave hanging.

What would have to be true for this to transfer to your system: the requirement is that a single unit of work outlive a deploy, and a thirty-second email send falls well short of that bar. The seven days of elapsed waiting in this onboarding arc [10] cross at least one release, probably several, and every one of them is a chance to lose the row that says which step a given user reached. That is the threshold I would use, and it is narrower than the framing here suggests. The author's own opening concedes it: standard queues only start to show limits when the work becomes a multi-day, retry-sensitive state machine [13]. Below that line, the delayed dispatch you already run is cheaper than a new cluster plus a determinism rule you have to teach the team.

What to watch

  • Whether the remainder of the workflow is published, including the second timer, the escalation step and the worker command that registers these classes.
  • A concrete retry policy in the sample: attempt counts and backoff, rather than a lone start-to-close timeout under a comment about retries.
  • Any figure for what running a Temporal cluster costs alongside existing Redis workers, which this walkthrough leaves out.

Clarity's read

What the record supports and how the coverage leans. The claims behind it follow.

Reality

Evidence44
Adoption
Insufficient
Hype gap+21
Incentives
Insufficient
Confidence33
Why these scores

Claim ledger

Ranked by verification strength, evidence, and original report placement.

  1. [1]

    Workflows are the orchestrator and must be deterministic: they dictate execution flow, handle sleep intervals and coordinate steps, and must not interact directly with external systems, databases or random functions.

  2. [2]

    Activities are the execution layer, may be non-deterministic, and perform the actual work such as database queries, third-party API calls, sending emails and writing files.

  3. [3]

    The example onboarding flow is: send a welcome email; wait 3 days; check whether the user uploaded a profile picture; if not, send a reminder; wait another 4 days; if still incomplete, flag the account for manual sales outreach.

    Reported SupportedView cited source

Get this ledger inside ChatGPT. Ask about any of our stories and the answer brings its figure, each claim’s verdict and the sources. Free, no account.

Add to ChatGPTAdd to Claude

Sources

1 independent publisher whose own reporting we read for this story.

  1. dev.to

    1 article · August 29, 2026

    Distributed Background Processing: Scaling Temporal Workflows with Laravel

Share your take

Let Clarity write the post for you.

Signed-in readers get a short post drafted on this story in the register they choose — narrative, analytical, or a direct position — editable to the last word before it goes anywhere. The share buttons at the top of this story work without an account.

Topics and entities

Follow any of these and your For You feed starts watching them — no settings page required.

Topics

Loading related stories