The server was rebooted overnight as planned. In the morning it turned out that the scheduled jobs had not run: the cron scheduler did not start after boot. The on-call engineer started it by hand, and the jobs got going.
So that the night does not repeat itself, ask the machine what state cron is in.
Three questions for the machine
Ask the machine three questions: is cron running now, will cron start at boot, and will ssh, the service people log in through, start at boot.
First, predict
This morning the on-call engineer started cron by hand. What will systemctl is-enabled cron print?
Now start the exercise, run the command and compare your prediction with the output.
Why did the overnight reboot bring ssh up but not cron?
-
cron starts fine: the on-call engineer started it this morning, and
systemctl is-active cronprintsactive. -
cron failed to come up overnight, before the morning start. The start made cron run; the
disabledfromis-enabledexplains the night. -
nginx has nothing to do with logging in, yet it comes up at boot:
systemctl is-enabled nginxprintsenabled.
For ssh is-enabled prints enabled, for cron it prints disabled: the morning start switched the service on, while starting at boot stayed off.