Skip to content

Lesson 4 of 9 · 23m

Eliminating Toil Without Automation Theater

Identify work that is manual, repetitive, automatable, and valueless, then remove it with safe automation rather than scripting around the problem.

Every experienced operations engineer knows the seductive lie: "This only takes ten minutes." Ten minutes twice a day is eighty hours a year. Add interruption cost, mistakes made while rushed, and the fact that the task scales with the business, and the small chore becomes a reliability tax. Toil elimination starts by treating that tax as engineering debt, not as a personality trait of the operations team.

Use the real definition of toil

Toil is manual, repetitive, automatable work that has no enduring value and grows with the service. Restarting a wedged worker every night is toil. Investigating why the worker wedges is engineering. Rotating a certificate by hand every ninety days is toil. Designing automatic renewal with verification is engineering.

manual       a human performs the steps
repetitive   the same decision appears again and again
automatable  a machine can apply the decision safely
reactive     the work appears because the system demands it
no value     after completion, nothing durable has improved
scales       growth makes more of it, not less

Measure before you automate

Track operational interrupts for a few weeks. A lightweight table in a spreadsheet or ticket system is enough:

task                         frequency    minutes    risk if wrong
restart image-resizer        7/week       12         low
clean failed export files    4/week       15         medium
re-run stuck billing job     6/month      20         high

Now you can choose by evidence. The best first candidate is frequent, bounded, low-risk, and easy to verify. The worst first candidate is rare but terrifying; you will build a complex automation system for a task nobody can test often enough to trust.

Automation needs the same rigor as production code

A shell script taped to cron is not the finish line. Safe automation is observable, idempotent, authenticated, least-privileged, and reversible. Consider a job that clears stale export files:

#!/usr/bin/env bash
set -euo pipefail
DRY_RUN="${DRY_RUN:-true}"

find /srv/exports -type f -name '*.partial' -mtime +2 -print0 |
while IFS= read -r -d '' file; do
  [[ "$DRY_RUN" == "true" ]] && { printf 'would remove %s
' "$file"; continue; }
  rm -- "$file" && printf 'removed %s
' "$file"
done

That is still only a prototype. Production automation should emit metrics, log what it changed, fail closed, authenticate with a scoped identity, and have an owner. If nobody can answer "how would we know this stopped working?" you have created a hidden dependency.

Remove the cause when possible

The most elegant toil elimination is deleting the need. If engineers manually resize a queue worker every morning, perhaps autoscaling belongs in the platform. If support manually re-sends webhooks because customers cannot see delivery failures, perhaps the product needs a delivery log. If operators manually approve routine low-risk access, perhaps policy can encode the approval.

Field notes

  • A good automation metric includes both runs and avoided minutes; otherwise success is invisible.
  • Beware automation that retries aggressively. Retrying a destructive operation can turn a small failure into a broad one.
  • Runbooks rot. Executable runbooks with verification rot more slowly, but still need ownership.
  • If automation requires a powerful permanent credential, you have moved risk rather than removed it.

Was this lesson helpful?

Sign in to rate