Six Ways a Cron Job Fails Quietly, and the Smallest Fix for Each

Most cron jobs do not fail loudly. They run twice, or not at all, or stop halfway, and nobody hears about it. We reproduced six of these failures on two real Ubuntu 24.04 hosts, with the job scheduled by cron, by a systemd timer and by a Kubernetes CronJob (plus busybox crond, the cron in most Alpine images, for the DST test), and measured what each one did and which small fix stopped it.
The short version:
- Overlap. A 150-second job scheduled every minute ran 3 copies at once under cron and under a CronJob with default settings.
flock -nstopped the overlap by skipping 13 of 20 runs, without a word in any log. A systemd timer never overlapped: it ran the next copy the moment the previous one ended. - Partial failure. A job whose second step failed twice in a row finished 0 of 4 times under cron. A systemd service with
Restart=on-failurefinished 4 of 4, but a plainINSERTin step 1 then loaded every row 3 times. Retries need an idempotent load. - No visibility. Cron found no mail transport on a stock Ubuntu droplet, so it logged "No MTA installed, discarding output" and the error message from its 10 failed runs was nowhere on the host. The same job under systemd left its message in the journal 10 times out of 10, and
OnFailure=fired an alert in the same second. - Downtime. With the host off for about 8 minutes, cron and a timer without
Persistent=lost every missed run. A timer withPersistent=trueran once, 9 seconds after boot. The CronJob ran the missed daily job and the most recent missed minute, and dropped the other 7 minutes. - Daylight saving. In New York time, a daily 01:30 job ran twice on the night the clocks went back under busybox crond and the Kubernetes CronJob, and a daily 02:30 job did not run at all on the night they went forward under busybox, systemd and the CronJob. Only Debian's cron ran both of those jobs exactly once. systemd's timers skipped the repeated hour: an every-15-minutes timer stopped after 01:45 EDT, and its next scheduled run was 75 minutes later.
- Two hosts. The same crontab on two servers sent every report twice,
flockincluded. A Postgres advisory lock looked like a fix under cron (20 of 20 sent once), then sent 10 of 10 twice under systemd timers, because the two hosts fired 6 seconds apart and the job only took 3. Claiming the slot in a table never sent a report twice. A plain claim lost the one slot whose run we killed after it claimed; with a lease, the other host sent that report 123 seconds later.
Everything below comes from one recorded run, and the lab that produced it is public:
This is a companion to Cron Is Not a Workflow Engine, where we moved one nightly ETL job from cron to a Kubernetes CronJob, Kestra and Prefect and broke all of them. That post asked when you need an orchestrator. This one asks what the smallest fix is for each failure before you get there, and tests the cases it left out: daylight saving, two hosts, systemd timers and retries.
TLDR
| Failure | What we saw without a fix | Smallest fix that held | Watch out for |
|---|---|---|---|
| Overlap | 3 copies at once (cron, CronJob) | flock -n, or a systemd timer |
flock -n skips silently; a timer runs back to back |
| Partial failure | 0 of 4 runs finished (cron) | Restart=on-failure + idempotent load |
Retries tripled the rows with a plain INSERT |
| No visibility | Cron's error message not stored anywhere | systemd journal + OnFailure= |
Cron discards output without an MTA |
| Downtime | All missed runs lost (cron) | Persistent=true |
One catch-up run, not one per missed run |
| DST | A daily job ran twice, or not at all | Schedule in UTC | Each scheduler behaves differently; systemd timers skipped the repeated hour |
| Two hosts | Every report sent twice | A claim row per scheduled time, with a lease | An advisory lock only works if the runs overlap |
Prerequisites
- Comfortable with crontab syntax, shell scripts and basic SQL
- Some systemd (units,
systemctl,journalctl); Kubernetes only for the CronJob rows - To rerun the lab:
doctllogged in to a DigitalOcean account, an SSH key registered there, and about 3 hours. It creates twos-2vcpu-4gbdroplets; the recorded run kept them for just under 3 hours, about $0.20.
How the lab works
Two Ubuntu 24.04 droplets, host a and host b, each with Debian's cron 3.0pl1 (the one Ubuntu ships), systemd 255, k3s 1.37.2 and Docker for a busybox crond container. Host a also runs Postgres 17.12 for the jobs that need a database; host b reaches it over the private network.
Every job, under every scheduler, calls one small script that appends a JSON line to /var/lib/lab/events.jsonl: the scheduler, the job, the event (start, end, skipped, sent), the time and the host. The scheduler never writes these lines itself, so a run that did not happen leaves nothing behind. The scorer derives every number below from those lines, the systemd journal, the Kubernetes events and the database tables, and refuses a file that contains events from another run.
There are three phases:
- Real clock, 20 minutes: overlap, partial failure and visibility on host a, and the two-host test on both.
- Downtime: host a is shut down and powered back on about 8 minutes later.
- Daylight saving: both hosts are switched to
America/New_York, NTP is turned off, and the clock is set shortly before a DST change: host a before the fall-back on 2027-11-07, host b before the spring-forward on 2027-03-14. Then the change happens in real time while the schedulers run.
Nothing was sped up: a failure that took 8 minutes in the lab took 8 real minutes. The one simulated part is the flaky API call in section 2.
1. Overlapping runs
The job sleeps for 150 seconds and is scheduled every minute. In real life this is the backup that used to take 40 seconds and now takes 70, on a one-minute or one-hour schedule.
# /etc/cron.d/lab-overlap (shortened: the lab's flock line also records each tick and skip)
* * * * * root /opt/lab/jobs/slow.sh cron overlap-plain 150
* * * * * root flock -n /run/lock/lab-overlap.lock /opt/lab/jobs/slow.sh cron overlap-flock 150
Over 20 scheduled minutes:
| Setup | Runs started | Most copies at once |
|---|---|---|
| cron | 20 | 3 |
cron + flock -n |
7 | 1 |
systemd timer, Type=oneshot |
8 | 1 |
Kubernetes CronJob, default concurrencyPolicy |
20 | 3 |
Plain cron and the CronJob did the same thing: they started a new copy every minute, whatever the old ones were doing. The CronJob's default concurrencyPolicy is Allow. If the job writes to the same file or table, three copies at once is where the corrupted backup comes from.
flock -n fixed the overlap and created a quieter problem. It skipped 13 of the 20 runs, and nothing recorded that. Cron logged the command line every minute, as it always does, and the 13 skipped minutes look exactly like the 7 that ran. We only know the number because the lab's crontab line adds || rec skipped after flock. If you use flock -n, log the skip yourself, or use flock -w <seconds> to wait for the lock instead when a late run is better than no run.
The systemd timer behaved differently from both. While the service was still running, the timer's next elapse did not start a second copy. When the run ended, the timer noticed that its schedule had passed and started the service again straight away:
lab-overlap.service: Deactivated successfully. 13:36:30.452
Finished lab-overlap.service - Overlap test job. 13:36:30.452
Starting lab-overlap.service - Overlap test job... 13:36:30.478
So 12 scheduled minutes collapsed into the 8 runs, and the job ran back to back for the whole 20 minutes. That is usually what you want for a sync job ("run as often as you can, never twice at once"), and not what you want for a job that hammers a database: if it gets slower than its interval, it never rests.
Smallest fix: a systemd timer, or flock with the skip logged. On Kubernetes, concurrencyPolicy: Forbid (skip) or Replace (kill the old run). We tested Forbid in the companion post, and a skipped tick can still come back late when the old Job finishes. The Bash best practices chapter covers how flock holds its lock.
2. A partial failure with no retry
The job has three steps: load 100 rows, call an upstream API, write a report row. The API call fails on the first two attempts of every run and works on the third. That is a flaky dependency, not a broken one. In the lab the call is simulated: step 2 prints a 503 error and exits 1 on attempts 1 and 2, counted per run in a file.
We ran it every 5 minutes, 4 times, under cron and under a systemd service that restarts on failure:
# /etc/systemd/system/lab-retry@.service
[Unit]
StartLimitIntervalSec=0
[Service]
Type=oneshot
ExecStart=/opt/lab/jobs/etl.py --sched systemd --variant %i
Restart=on-failure
RestartSec=15
The systemd.service man page allows Restart=on-failure for Type=oneshot (it rejects only always and on-success), so a timer-driven job can retry without a wrapper script. StartLimitIntervalSec=0 turns off the start limit. With RestartSec=15 this job never came near the default (5 starts in 10 seconds), but a job with a short RestartSec= can hit it and stop retrying.
Each setup ran with two versions of step 1: a plain INSERT into a table with a surrogate key, and an idempotent load keyed on the business key (ON CONFLICT DO NOTHING).
| Setup | Runs | Attempts per run | Finished | Rows per run (want 100) | Reports |
|---|---|---|---|---|---|
cron, plain INSERT |
4 | 1 | 0 | 100 | 0 |
| cron, idempotent load | 4 | 1 | 0 | 100 | 0 |
systemd, Restart=on-failure, plain INSERT |
4 | 3 | 4 | 300 | 4 |
systemd, Restart=on-failure, idempotent load |
4 | 3 | 4 | 100 | 4 |
Cron gave up after the first failure, every time. Each run left 100 rows loaded and no report: a half-done day that looks done to anything that only checks the rows.
The systemd service retried twice and finished every run about 32 seconds after it started (31.8 to 33.1). With the plain INSERT, every retry loaded the same 100 rows again, so each run ended with 300 rows and a correct-looking report. That is the trap with retries: they turn "sometimes missing" into "sometimes tripled", which is harder to notice. With the idempotent load, the retries were harmless. That only holds if a retry uses the same key as the first attempt: our job rounds its start time down to the 5-minute slot, which worked because every retry finished within 33 seconds. A retry that crosses the boundary would load under a new key. Pass the scheduled date in, or store it on the first attempt.
Step 3 needs the same care. In this lab the report is a row, so a WHERE NOT EXISTS check is enough. If it is an email or a webhook, claim it in the database first, and send a stable key so the receiver can drop a repeat, as in how Stripe avoids double charging.
Smallest fix: Restart=on-failure with a RestartSec=, and every step safe to run twice. Retries without idempotency trade missing data for duplicated data.
3. A failure nobody sees
The job prints backup: cannot write /var/backups/db.dump: No space left on device to stderr and exits 1, every 2 minutes. Where does that message go?
Cron's answer is mail. It collects the output and sends it to the job's owner, or to MAILTO. A stock Ubuntu 24.04 droplet has no mail transport installed, so this is what cron logged instead, after each run that printed anything:
CRON[7245]: (CRON) info (No MTA installed, discarding output)
After 10 failed runs we searched the journal, /var/log, /var/mail and /var/spool/mail for the error text. Every copy we found came from the systemd version of the same job (the journal, and rsyslog's copy in /var/log/syslog). None came from the 10 cron runs. The cron log shows that the command ran; it does not show the exit code or the message.
The same script as a systemd service:
[Unit]
OnFailure=lab-alert@%n.service
[Service]
Type=oneshot
ExecStart=/opt/lab/jobs/fail.sh systemd fail
All 10 failures left the full message and the exit status in the journal (journalctl -u lab-fail), and the OnFailure= unit ran 10 times, each in the same second as the failure (the lab's log has one-second resolution). In the lab it only records an event; in production it would call your pager or a webhook.
Two caveats. OnFailure= fires on failure, not on silence: if the timer never fires, or the host is off, nothing alerts. Something outside the host still has to expect the job, which is why the companion post used a dead-man check. And if you stay on cron, install a mail transport or redirect output to a file or logger in every crontab line, because the default is to throw it away.
Smallest fix: run the job as a systemd service (the journal keeps stdout, stderr and the exit status) with OnFailure=, plus a dead-man check from somewhere else.
4. Runs missed while the host was down
We installed a daily job whose time fell 5 minutes in the future, plus an every-minute job, then shut host a down 2.5 minutes in and powered it back on. It went off at 14:03:45 and its journal starts again at 14:11:32. The daily time (14:06) and 8 minute ticks passed while it was off.
| Setup | Catch-up runs after boot | When |
|---|---|---|
| cron, daily and every minute | 0 | - |
systemd timer, Persistent=false |
0 | - |
systemd timer, Persistent=true, daily |
1 | 9 s after boot |
systemd timer, Persistent=true, every minute |
1 (for 8 missed) | 9 s after boot |
CronJob, daily, no startingDeadlineSeconds |
1 | 30 s after boot |
CronJob, every minute, no startingDeadlineSeconds |
1 (for 8 missed) | 30 s after boot |
Cron has no memory of time it was not running. The missed daily run was simply gone, and nothing said so.
Persistent=true makes systemd store the last trigger time on disk (/var/lib/systemd/timers/stamp-*.timer) and run the service once at boot if a trigger was missed. Once: for the every-minute timer, 8 missed ticks produced a single run. For a daily backup that is exactly right. For a job that processes "the previous minute", it means 7 minutes that nobody processed, unless the job itself works out what it missed. The same applies to an hourly job after an 8-hour outage.
The CronJob controller did the same thing in its own way. When k3s came back, it created one Job for the daily schedule at 14:06 and one for the most recent missed minute, 14:11. The Job names end in the scheduled minute, so this is visible in kubectl get events. The 7 earlier minutes were never started, which matches the Kubernetes docs: only the most recent missed schedule runs. If you set startingDeadlineSeconds, that one also runs only if the controller gets to it within that many seconds of its scheduled time. We did not test a deadline here.
Anacron is the classic answer for laptops and machines that sleep, but it works in whole days, so we left it out.
Smallest fix: Persistent=true for daily or weekly work. For anything finer, make the job load "everything since the last success" instead of "the previous interval", so one catch-up run is enough.
5. Daylight saving
Twice a year, in most of North America and Europe, one local hour happens twice and one does not happen at all. A job scheduled in local time inside that hour has to do something, and each scheduler picks its own answer.
We set both hosts to America/New_York, turned NTP off and set the clock shortly before each change: host a to 01:10 EDT on 2027-11-07 (at 02:00 EDT the clock goes back to 01:00 EST), and host b to 01:40 EST on 2027-03-14 (at 02:00 EST it jumps to 03:00 EDT). Then we let them run through the change in real time. The same four jobs ran under all four schedulers, with every CronJob setting timeZone: America/New_York (stable since Kubernetes 1.27):
30 1 * * * daily at 01:30 (happens twice in the fall)
30 2 * * * daily at 02:30 (does not exist in the spring)
30 * * * * every hour at :30
*/15 * * * * every 15 minutes
Fall back (01:00 to 02:00 happens twice):
| Job | Debian cron | busybox crond | systemd timer | CronJob |
|---|---|---|---|---|
| daily 01:30 | 1 run (01:30 EDT) | 2 runs (01:30 EDT, 01:30 EST) | 1 run (01:30 EDT) | 2 runs (01:30 EDT, 01:30 EST) |
| every hour at :30 | 2 | 2 | 1 | 2 |
| every 15 minutes, 01:10 EDT to 01:52 EST | 7 | 7 | 3, none after 01:45 EDT | 7 |
Spring forward (02:00 to 03:00 does not exist):
| Job | Debian cron | busybox crond | systemd timer | CronJob |
|---|---|---|---|---|
| daily 02:30 | 1 run, at 03:00 EDT | 0 runs | 0 runs | 0 runs |
| every hour at :30 | 1 (03:30) | 1 | 1 | 1 |
| every 15 minutes, 01:40 EST to 03:52 EDT | 5 | 5 | 5 | 5 |
Four schedulers, three different behaviors:
- Debian's cron has explicit DST handling, described in
man cron: for clock changes under 3 hours, fixed-time jobs that fall in a skipped hour "will be run soon after the change", and fixed-time jobs in a repeated hour "will not be re-run". Jobs with*in the hour or minute field are not affected and follow the new time, so the hourly and 15-minute jobs ran in both copies of the repeated hour. The daily 01:30 ran once in the fall and the daily 02:30 ran once, at 03:00, in the spring. - busybox crond and the CronJob follow the wall clock literally. 01:30 happened twice, so the daily job ran twice; 02:30 never happened, so it did not run that day. The two Kubernetes Jobs are not a retry: their
batch.kubernetes.io/cronjob-scheduled-timestampannotations read01:30:00-04:00and01:30:00-05:00. - systemd calendar timers did not repeat a local time. In the fall they treated the second 01:00 to 02:00 as already passed: the daily 01:30 ran once, the hourly job skipped 01:30 EST, and the 15-minute timer did not fire after 01:45 EDT.
systemctl list-timersduring the repeated hour showed its next run as 02:00 EST, a 75-minute gap. In the spring they did not run the 02:30 job at all;systemctl list-timersshowed the next run as the following day. You can check your own expressions withsystemd-analyze calendar --iterations=5 '*-*-* 02:30:00'.
If your daily backup runs at 02:30 local time on a systemd timer, a busybox-based container or a CronJob, it skips one day a year. If it runs at 01:30 on busybox or a CronJob, it runs twice one day a year. Neither leaves an error behind.
The cron expression simulator shows the plain wall-clock behavior (skip in the spring, twice in the fall), which matches busybox and the CronJob, and notes that real implementations differ. This table is how three of them differ.
The fix we tested is the simplest one: schedule in UTC. A systemd timer with OnCalendar=*-*-* 06:30:00 UTC on host a ran once, at 06:30 UTC (01:30 EST), on the fall-back night. UTC has no DST, so the problem goes away; the cost is that the job's local time moves by an hour twice a year. If it has to be local time, keep daily jobs out of the hours your time zone changes (01:00 to 03:00 in New York; other zones change at other hours), and make them idempotent per date so a second run is harmless. On Kubernetes, leave timeZone unset only if you know the controller manager runs in UTC; set timeZone: Etc/UTC to make it explicit.
Smallest fix: schedule in UTC, or keep local-time jobs outside the hours your time zone changes, and make them safe to run twice.
6. The same job on two hosts
This is the one that shows up after someone makes the "cron box" highly available by putting the same crontab on two servers. The job sends one report per minute (per 2 minutes for the timer rows), takes 3 seconds, and runs on both hosts. We tried the usual fixes:
# jobs/send.py, the three guards that matter
# advisory: a Postgres lock held while the job works
conn.execute("SELECT pg_try_advisory_lock(%s)", (zlib.crc32(job.encode()),))
# claim: whoever inserts (job, slot) first does the work
conn.execute("INSERT INTO claims (job, slot, host) VALUES (%s, %s, %s) "
"ON CONFLICT DO NOTHING RETURNING slot", (job, slot, HOST))
# lease: the same claim with an expiry, plus a sweep that takes over expired, unfinished slots
conn.execute("UPDATE leases SET host = %s, lease_until = now() + %s::interval, attempts = attempts + 1 "
"WHERE job = %s AND done_at IS NULL AND lease_until < now() RETURNING slot", ...)
The slot is the job's start time rounded down to the minute (to 2 minutes for the timer rows). That is a shortcut that works here because every run started within 7 seconds of its schedule; we come back to it below. Over 20 minutes:
| Setup | Slots | 0 reports | 1 report | 2 reports |
|---|---|---|---|---|
| cron, no guard | 20 | 0 | 0 | 20 |
cron + flock |
20 | 0 | 0 | 20 |
| cron + Postgres advisory lock | 20 | 0 | 20 | 0 |
| cron + slot claim | 20 | 1 | 19 | 0 |
| cron + slot claim with lease | 20 | 0 | 20 | 0 |
| systemd timer + advisory lock | 10 | 0 | 0 | 10 |
| systemd timer + slot claim | 10 | 0 | 10 | 0 |
flock changed nothing, as expected: the lock file is on each host's own disk, so each host only ever sees its own runs.
The advisory lock is the interesting one. Under cron it worked 20 times out of 20, because Debian cron starts jobs at the top of the minute, and the job logged its start about 2 seconds into the minute on both hosts (median 2.04 s on host a, 1.69 s on host b). The second host always found the lock taken. Under systemd timers, the same lock and the same job sent every report twice, because the hosts did not start together:
systemd timer start, seconds into the slot: host a 0.4 to 0.9 host b 6.5 to 6.8
That gap fits how AccuracySec= works. It defaults to one minute, exists so systemd can group wake-ups together, and within that window systemd places the elapse time at a "host-specific, randomized, but stable position" (from man systemd.timer). We did not change the setting to prove it was the cause, but the timer units were identical on both hosts. (RandomizedDelaySec= is the setting meant to spread load across machines; it adds an independent random delay on each host, so it does not line hosts up either.) Host a ran its 3-second job and released the lock before host b started. An advisory lock only stops runs that overlap in time; it says nothing about whether this slot was already done. A slow host, a clock that is a few seconds off, or a job that got faster would break the cron version the same way. (We did not inject that; it follows from how the lock works, and the timer rows show it.)
Claiming the slot does not depend on the runs overlapping, because the question it asks is "has anyone done 13:41 yet?" instead of "is anyone running right now?". It sent 19 of 20 reports once under cron and 10 of 10 under timers. The missing one is the run we killed on purpose: at 13:41:02 a run on host a claimed its slot and was then killed with SIGKILL before sending. The claim stayed, so neither host ever sent the 13:41 report. That is the gap a plain claim leaves.
The lease version closes it. A claim carries an expiry (90 seconds here), and every run first sweeps for slots whose lease ran out without finishing. The same crash on the lease variant was picked up by host b's run at 13:43:02 and the report went out at 13:43:05, 123 seconds after the crash. The UPDATE ... WHERE lease_until < now() is safe to race: under READ COMMITTED, a second host blocked on the same row re-checks the condition after the first commits, finds the lease no longer expired, and takes nothing.
Two limits of this version, neither of which we tested:
- The key must be the scheduled time, not the start time. Our slot is the start time rounded down. A run that starts late, such as a
Persistent=truecatch-up or a timer near the end of its accuracy window, gets a different key from the run it duplicates, and the claim lets both through. Pass the scheduled time in: the CronJob'sbatch.kubernetes.io/cronjob-scheduled-timestampannotation, aPARTITIONargument from cron, or a date the job computes from its own schedule. - A lease is at least once, not exactly once. The send and the
done_atupdate are separate statements, so a crash between them, or a run that outlives its lease, can send the same report twice. Send a stable key (job and slot) with the report so the receiver can drop a repeat.
Smallest fix: a claim table keyed on (job, scheduled time), with a lease if a lost run matters, and a stable key on whatever the job sends. The clock skew post covers keeping those hosts' clocks in step, which matters as soon as "the scheduled slot" is computed from each host's own clock.
When the small fixes add up to an orchestrator
Look at what the lease version of send.py became: a table of runs, each with an owner, a state, an attempt count and an expiry, and a sweep that retries the dead ones. That is the core of a job scheduler, written in a couple of dozen lines of Python and tested for one failure. It is fine to stop there for one job. It is a warning sign when you copy it into the fifth.
The fixes above are enough when:
- The job is one step, or rerunning it from the start costs little.
- One catch-up run after downtime is enough, because the job loads "everything since the last success".
- A failed run alerting through
OnFailure=, plus a dead-man check from outside, is all the history you need. - Each job has its own claim table or runs on one host.
Move to something with a real queue or scheduler when:
- You need a history of every run, with its state and output, without reading journals on several hosts.
- Missed runs must each run afterwards with their own date, or you backfill date ranges.
- Steps are expensive, and a failure in step 3 should not repeat steps 1 and 2.
- Jobs depend on each other, or several people trigger runs by hand.
- You have written the lease table twice.
What "real" means depends on the work. For a few scheduled jobs that need a queue and retries, a job queue in the database you already run is the smallest step. If steps are expensive and must not repeat, durable execution records each finished step; we built a small one in Running a Background Job That Must Not Be Lost. For pipelines with dependencies and backfills, a workflow orchestrator; the companion post measured Kestra and Prefect against cron and a CronJob, including how each one behaved after a reboot. On Kubernetes, a CronJob comes with retries (backoffLimit), history and a concurrency policy, but as the downtime and DST rows show, it still runs only the latest missed schedule and you still need idempotent work.
What we could not conclude
- One run of each failure. Each table is one recorded run on one pair of droplets. The mechanisms are deterministic (cron does not retry,
flockis per host), but timing numbers such as the 6-second timer gap are specific to these two machines. Another pair of hosts gets other positions within the one-minute window. - The cron advisory-lock result depends on timing we did not stress. We did not add clock skew or load on host b. Its 20 of 20 means the hosts started within the 3-second job, not that the lock is safe.
- One cron implementation per family. Debian's cron 3.0pl1 (Ubuntu's default) and busybox crond. cronie (RHEL, Fedora, Arch) has its own DST rules and supports
CRON_TZ; we did not test it. - No email. We measured where cron's output goes without a mail transport, which is the default on the image we used. With
postfixormsmtpinstalled, cron does mail the output, and someone has to read that mailbox. - The crash test killed one run once. It shows the gap a plain claim leaves and that the lease closes it, not how long recovery takes in general (that is the lease length plus up to one interval).
Summary
Cron is a very small program: it starts a command at a time. Almost everything else (not overlapping, retrying, keeping the error, catching up, running once across hosts) is your script or another tool, and even DST handling depends on which cron you have. Each fix below is small, and each has a limit:
- Overlap: a systemd timer, or
flockwith the skip logged. - Retries:
Restart=on-failure, and loads that are safe to run twice. - Visibility: the journal and
OnFailure=, plus a dead-man check from outside. - Downtime:
Persistent=true, and jobs that load "since the last success". - DST: schedule in UTC, or keep daily jobs out of the hours your time zone changes.
- Two hosts: a claim per scheduled time, with a lease and a stable key on what the job sends.
If you want to see when an expression actually fires, including around DST, try the cron expression simulator. And if the list of small fixes is getting long, the companion post is about the next step.
Try it hands-on
Run the commands from this article in the browser. Nothing to install.
Learn Linux - Interactive Tutorial
Master essential Linux commands through interactive lessons. Practice pwd, ls, cd, cat, grep, chmod, pipes, and more in a simulated terminal environment with 6 progressive lessons.
Kubernetes Terminal Simulator
Practice Kubernetes commands in an interactive browser terminal. Learn kubectl contexts, nodes, Pods, Deployments, Services, rollouts, logs, exec, events, ConfigMaps, and cleanup workflows with a live cluster visualization.
The companies that keep DevOps Daily free. Some links are referral links.
Bitrise
Managed runners for GitHub Actions
Bitrise Build Hub runs your GitHub Actions jobs on M4 Macs and AMD Linux machines. Change runs-on and keep your workflows, secrets and logs on GitHub.
Plakar
Open-source backup and restore
Encrypted, deduplicated snapshots with instant browsing and restore, across clouds and on-prem. Open source, with developer-friendly tooling.
Atomsized
AWS platform engineering and GitOps
Design and automation for reliable AWS and Kubernetes platforms, safer delivery workflows, and preview and UAT environments your engineers can understand and own.
DigitalOcean
Cloud infrastructure for developers
Simple, reliable cloud computing designed for developers
DevDojo
Developer community & tools
Join a community of developers sharing knowledge and tools
SMTPfast
Developer-first email API
Send transactional and marketing email through a clean REST API. Detailed logs, webhooks, and embeddable signup forms in one dashboard.
Want to support DevOps Daily and reach thousands of developers?
Become a SponsorTags
Found an issue?
Related Posts
Also worth your time on this topic
cgroup v2 memory.high Throttles, memory.max Kills: Measured on a Host Without Swap
We ran one allocating workload under memory.max, memory.high and both on a Linux 6.8 host with no swap. memory.max killed it in under half a second. memory.high did not kill it: new allocations waited, once per 64-page batch at best and once per page next to a busy neighbour on the same CPU. Here are the numbers, the kernel formula behind them, and what systemd, Docker and Kubernetes write.
Linux Server Monitoring and Maintenance Essentials
Learn to monitor system resources, manage logs, configure automatic security updates, and set up basic alerting with cron jobs on your Ubuntu server.
45 minutes
Argo CD Multi-Environment Repository Structure Checklist
How to organize your Git repositories when running Argo CD across dev, staging, and production. Covers folder layout, app-of-apps, ApplicationSets, secrets, RBAC, and promotion flow.
60-90 minutes