Interview Prep/Linux/Scheduling, automation and scripting

How would you get alerted if a critical nightly job silently stops running altogether?

IntermediateScenarioScheduling, automation and scripting
Answer

Situation read → Failure alerts don't fire if the job never starts. You need a heartbeat.

What I'd do →

  1. At the end of a successful run, ping a dead-man's switch:
/usr/local/bin/backup.sh && curl -fsS -m 10 --retry 3 https://hc.example.com/ping/<uuid>
  1. Or push a metric job_last_success_timestamp to Prometheus Pushgateway / node_exporter textfile collector, and alert if time() - job_last_success_timestamp > 90000.
  2. For systemd timers, add OnFailure=notify@%n.service.

Why → The absence of a signal is what you alert on.

Interview tip → "Alert on missing success, not just on failure" is a senior-level answer.

All Linux questions Roadmap: Linux

More on Scheduling, automation and scripting