Version identifiers
Version identifiers combine the date and a sequence number:| Identifier | Meaning |
|---|---|
20240313.1 | March 13 2024, first deploy that day |
20240313.2 | March 13 2024, second deploy that day |
20240314.1 | March 14 2024, first deploy that day |
20240313.1 can exist independently in both dev and prod.
How version locking works
When a task run starts, it is locked to the version that was current at that moment. Even if you deploy a dozen new versions while the run is executing, it continues on the same code. Retries of a run also execute against the same locked version. Delayed runs are locked to the version active when they begin executing, not when they were enqueued.Child tasks
How version locking applies to child tasks depends on whether the parent waits for the result:| Trigger function | Child task version | Locked |
|---|---|---|
trigger() | Latest (current) | No |
batchTrigger() | Latest (current) | No |
triggerAndWait() | Same as parent | Yes |
batchTriggerAndWait() | Same as parent | Yes |
triggerAndWait and batchTriggerAndWait ensures the parent and child are always running compatible code.
Versions in local development
When running the dev server (npx trigger.dev dev), every relevant code change automatically registers a new version. Each task run spawns a dedicated process locked to the version at the time of the run — so hot-reloading your code does not affect in-progress dev runs.
Deploying a new version
Runningtrigger.dev deploy creates a new version and immediately promotes it to the current version for that environment. All new runs after this point execute against the new code.
Skipping promotion
Use--skip-promotion to deploy a new version without making it current. This is useful for staging a deploy and testing it before rolling it out: