A one-off data fix must run at 9 PM tonight, just once. How do you schedule it?
BeginnerScenarioScheduling, automation and scripting
Answer
Situation read → One-shot scheduling.
What I'd do →
echo "/usr/local/bin/fix-data.sh >> /tmp/fix.log 2>&1" | at 21:00
atq
at -c <job> # see the full job
atrm <job> # cancel
Or with systemd: systemd-run --on-calendar='2026-11-09 21:00' /usr/local/bin/fix-data.sh.
Why → No need to add then remember to remove a cron line.
Interview tip → atd must be running; check systemctl status atd.
More on Scheduling, automation and scripting
A database dump must run every night at 1:30 AM. How do you schedule it with cron so it is reliable?BeginnerConvert that nightly cron job to a systemd timer. Why would you?IntermediateA cron job runs every 5 minutes, but sometimes takes 8 minutes and two copies overlap, corrupting data. How do you prevent that?BeginnerYou have 300 servers running the same cron job at midnight, and they hammer a shared API. How do you fix it?IntermediateA job must run on the last day of every month. Cron has no "last day" field. What do you do?IntermediateYou inherited a server and need to know every scheduled job on it. Where do you look?Beginner