Use this when jobs must wait for other jobs.
Job Dependencies
Job dependencies make a scheduled job wait for others to finish successfully, such as running a report only after the nightly import, avoiding jobs reading incomplete data.
1. Job dependencies: run B after A succeeds.
2. Use orchestrators (workflow engines, pipelines) instead of time offsets.
3. Handle upstream failure.
4. Timeouts.
5. Visualise.
job A success → triggers job B
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Verification path Verify boundary
The negative fixture should deliberately exercise risks such as DST/timezone drift, duplicate firing, missed triggers, scheduler downtime, dependency race, long-running overlap and successful trigger without successful target work, choosing the cases most relevant to DAG/order constraints, upstream success criteria, data/artifact handoff, cycle detection and behavior when a dependency is late or failed.
Step 2 Common mistakes Narrow the fault
- Using fixed time gaps instead of real dependencies.
- Downstream jobs running after an upstream failure.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Dependencies stop jobs from reading incomplete data.
- Define what counts as upstream success.
- Set timeouts for waiting.
- DAG/dependency definition — ordering
- Upstream success checks — gating
- Timeouts for waiting — deadlock prevention
ReferenceWhy it matters1 section · depth on demand
What it is
Job dependencies start a job only when another has finished (successfully), forming a chain or DAG. Most CI/workflow tools express this explicitly (needs:, depends_on).
ReferenceImportant terms & boundaries1 section · depth on demand
In depth
Job dependencies order scheduled jobs that rely on each other — export data before importing it, back up before compacting, collect configurations before running compliance checks. Scheduling them at fixed times ("export at 01:00, import at 02:00") only works until the export takes longer than an hour.
Better approaches:
| Approach | Example |
|---|---|
| Chain in one job | Script runs step A, then B |
| Scheduler dependencies | Rundeck job references, Jenkins downstream jobs, systemd After=/Requires= |
| Workflow engine | DAG with explicit dependencies |
| Completion marker | B waits for a file/flag written by A |
Make the dependent job verify its input (fresh timestamp, expected size) rather than trusting that the earlier job succeeded.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Scheduling > Job Dependencies. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.freedesktop.org/software/systemd/man/latest/systemd.timer.html · confidence 94%Deep reference
Healthy vs suspicious evidence
Output interpretation
For DAG/order constraints, upstream success criteria, data/artifact handoff, cycle detection and behavior when a dependency is late or failed, prefer typed fields and stable IDs over human presentation text.