-1

In an answer to the question How to shutdown Linux at a specific datetime from terminal? a high-rep user provides two solutions: using at and using cron. The cron-based option says "this not a good idea for shutdown".

Why would this not be a good idea? I know that at removes tasks from its queue after executing them, while jobs entered in cron just remain visible. Are there any other arguments besides the above that would support using at over cron for a shutdown?

Tsundoku
  • 828

1 Answers1

3

cron is used to specify repeated tasks. Executed tasks remain visible and active.

If you schedule via cron a shutdown for the 14 of the month and forget to remove the cron job afterwards, the server will shut down again one month later. When working with systems it's a good habit to make things as foolproof as possible.

dr_
  • 29,602