[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [SAGE] crontabs vs /etc/cron.[daily,hourly,*] vs. /etc/cron.d/
- To: "Dustin Puryear" <dustin@xxxxxxxxxxxxxx>
- Subject: Re: [SAGE] crontabs vs /etc/cron.[daily,hourly,*] vs. /etc/cron.d/
- From: "Jeremiah Johnson" <jeremiah.johnson@xxxxxxxxx>
- Date: Wed, 9 Jan 2008 11:51:24 -0600
- Cc: sage-members@xxxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=9XXo0nwxU4t5NKuCsdOCTKv1/EJ8NfEdC2XQ7JU6ccs=; b=tjV+DeX9NkLPTvAac1TBZT2qo6y8ruoTilNNmWlC+AVQ6HzY8UMZmQtviE9+tQjgRPdHaF+/jUSCsrSrr1B+rYXd6WE2euJckuPTR+sYKMSAjGPaLhnGLjgoo7QfM+9aU7nNvJMhB752bg5iR6BLBXkf7Di3lHv1OMnrU1sOUgM=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=jrrrfLA8E1/6OgjYpmQUuiftsKcgBFmHh1WCgJhEAF2WZwLW5Z5/1bNGto5d4qGMtrQtm0xli+EFZ5z4yrCV/ari6+375+Dy5VL36KEZF9hasV5E+czOTSA/WqaEEWUKcTqmdSQ+NBvRfIWMzd9X8ScSt0beLZXQxy2Dx+tB1c8=
- In-reply-to: <4784373D.3040006@xxxxxxxxxxxxxx>
- References: <4784373D.3040006@xxxxxxxxxxxxxx>
- Sender: owner-sage-members@xxxxxxxxxx
My opinion is that they are all correct, but if you have a team of Sys
Admins, you should agree upon a Standard, and make sure its followed.
-miah
On Jan 8, 2008 8:53 PM, Dustin Puryear <dustin@xxxxxxxxxxxxxx> wrote:
> So, we have an internal debate at Puryear IT about how to best setup
> cronjobs. First, let's assume Linux here. Every UNIX flavor has some
> unique trick it likes to use, but Linux is a good example of several
> ways to do cronjobs.
>
> So, with most Linux installs, you have these options:
>
> 1. normal use of crontabs
> 2. creating a crontab-like entry in a file in /etc/cron.d/
> 3. creating symlinks to your scripts in /etc/cron.hourly/,
> /etc/cron.daily/, etc. (I'll just say /etc/cron.daily to be short.)
> 4. /etc/crontab for the root user being able to run cron jobs as any
> user, unlike /etc/cron.d/ and /etc/cron.daily/.
>
> The question here isn't one of technical correctness (they are all
> correct), but one of consistency both internally and, potentially, with
> other people messing with cronjobs on the same box.
>
> The debate started when I logged into a server and didn't see our jobs
> in root's crontab or as symlink under /etc/cron.daily/. They were in
> /etc/cron.d/. Fine. Except I never do that. I usually use a user's
> crontab or /etc/cron.daily/. So, immediately, we have a internal
> consistency issue, which could, conceivably, cause me to create a
> duplicate cronjob. (Let's ignore documentation and change management.)
>
> The problem I have with /etc/cron.d/ is that most people DON'T USE IT.
> Sure, system scripts that come with the distro often do, but, really,
> how many sysadmins create their cronjobs there? Not many in my
> experience. Yet, there is a certain cleanness to /etc/cron.d/. :)
>
> /etc/crontab has the unique benefit of letting centralize your cronjobs,
> but then you have a single file that everyone has to muck with. Yuck.
> Oh, and trouble..
>
> So, what are your thoughts? How do you handle this?
>
> --
> Puryear Information Technology, LLC
> Baton Rouge, LA * 225-706-8414
> http://www.puryear-it.com
>
> Author, "Best Practices for Managing Linux and UNIX Servers"
> http://www.puryear-it.com/pubs/linux-unix-best-practices
>
> Identity Management, LDAP, and Linux Integration
>