/etc/crontab vs /var/spool/cron/root - Unix

This is a discussion on /etc/crontab vs /var/spool/cron/root - Unix ; Small question: Just wondering if there is any real difference to putting an entry in one or the other? Dan...

+ Reply to Thread
Results 1 to 5 of 5

Thread: /etc/crontab vs /var/spool/cron/root

  1. /etc/crontab vs /var/spool/cron/root

    Small question:

    Just wondering if there is any real difference to putting an entry in
    one or the other?

    Dan


  2. Re: /etc/crontab vs /var/spool/cron/root

    so it's purely ease of use and privacy that are the issues? not about
    the way they are run?


  3. Re: /etc/crontab vs /var/spool/cron/root

    In article <1115854838.945394.185920@g49g2000cwa.googlegroups. com>,
    "danson" wrote:

    > so it's purely ease of use and privacy that are the issues? not about
    > the way they are run?


    Right. And also sort of historical compatibility.

    In the original cron daemon there was just /etc/crontab. I'm not sure
    if it even let you specify a username, I think everything was run as
    root (but the command could be "su -c 'command line'" in
    order to run as some other user).

    Later, a new cron daemon that supported per-user crontabs in /var/spool
    was developed, with the crontab command as the UI. I'm not sure where
    it originated, but it was in SunOS 4.x in the late 80's.

    When some recent open-source cron daemons were implemented, I guess they
    decided that rather than pick one or the other configuration mechanism,
    they'd support both. So administrators who like editing the crontab
    file directly can use /etc/crontab, while users can submit personal cron
    jobs via the crontab(1) command.

    --
    Barry Margolin, barmar@alum.mit.edu
    Arlington, MA
    *** PLEASE post questions in newsgroups, not directly to me ***

  4. Re: /etc/crontab vs /var/spool/cron/root

    Barry,

    Appreciate the historical context. All makes sense now and I believe
    the current 'mixed method' state of affairs is actually quite optimal.

    Daniel


  5. Re: /etc/crontab vs /var/spool/cron/root

    danson wrote:
    > Appreciate the historical context. All makes sense now and I believe
    > the current 'mixed method' state of affairs is actually quite optimal.


    Just a personal, philosophical view, but I feel that the 'mixed
    method' is the worst possible approach. With the mixed method, there is
    no one single place you can be sure to find every scheduled job and no
    command you can use to find every single job. It's just inviting people
    to make mistakes. For example, J. Random Administrator comes from a
    culture which uses only one method: he needs to check for cron jobs, so
    he uses his method, sees some, and thinks that's it. Simplicity and
    consistency are virtues, and the mixed method trades those away for the
    questionable benefit of a very slight increase in flexibility.

    JDW


+ Reply to Thread