Wednesday, 20 December 2017

Linux for sysadmins - Using crontab

Linux for sysadmins - Using crontab

Automating repetitive tasks is a huge time saver and important skill for every Linux user, especially sysadmins. Crontab is where that gets done.
http://linuxtechlab.com/scheduling-important-jobs-crontab/

2 comments:

  1. While cron is great, crontab is a little risky. It's better to create files in /etc/cron.d (or cron.hourly etc.). That way you can manage them separately, you can put them in a source control system (or package manager, or makefile, or ansible role), and you aren't at risk of accidentally breaking them with crontab and a typo.

    ReplyDelete
  2. Adrian Colley I tend to agree, but this is really just on overview of cron and crontab at the most basic, abstract level. The additions in cron.d are the same format wise so the skills are the same.
    But yes, anyone reading this should RTFM for your Linux/Unix/BSD distribution and see what is it's preferred method of handling cron jobs and following that recommendation.

    ReplyDelete