Automatising crontab

  1. Do not tinker with crontab at all for the same kinds of a task: Make crontab execute a script that handles all cases sequentially.
  2. If necessary, reserve a part of the crontab that can be modified elsewhere, recreate only that very part you actually deal with.
  3. Use separate files, like /etc/cron.d/*.

  4. Get rid of parsing an existing crontab, re-create it entirely when needed.

    Good practice: Always write a configuration file instead of editing an existing one.

cron (last edited 2014-04-20 21:06:38 by bwe)