Use this when a job may overlap its previous run.
Concurrency · Scheduling
Concurrency in scheduling controls whether a job may start while its previous run is still running — allow, skip or queue — preventing overlapping runs from conflicting.
1. Prevent overlapping runs and resource contention.
2. Locks/single-instance settings.
3. Limit concurrent jobs.
4. Detect long-running jobs.
5. Alert on skipped runs.
trigger → lock check → run or skip
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 Common mistakes Narrow the fault
- Overlapping runs corrupting shared files.
- Queues of delayed runs piling up.
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.
- Decide whether to allow, skip or queue overlapping runs.
- Overlaps cause conflicts on shared resources.
- Locks prevent concurrent runs.
flock -n /var/lock/job.lock cmd || echo 'already running'— lock- Scheduler overlap settings — single instance
- Concurrency limits for shared resources — protection
ReferenceWhy it matters1 section · depth on demand
What it is
Concurrency controls whether a job may run while a previous run is still active: allow, skip, queue or replace.
ReferenceImportant terms & boundaries2 sections · depth on demand
How it works
Without a guard, a scheduler starts a new run even if the last one is still running. A lock file (flock), a concurrencyPolicy: Forbid (Kubernetes), or a 'skip if running' setting in the scheduler prevents overlap; queueing is only safe when runs are short and idempotent.
Example
flock -n /run/lock/backup.lock /opt/scripts/backup.sh
# Kubernetes CronJob: concurrencyPolicy: Forbid
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 > Concurrency. 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%