crontab question - Redhat

This is a discussion on crontab question - Redhat ; I have a RH9 system. The crontab seems to have an extra column. The manual talks of the 5 time settings (minute, hour, day, month, dayofweek) and then the command.However, the manual and the system crontab seems to have a ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: crontab question

  1. crontab question

    I have a RH9 system. The crontab seems to have an extra column.

    The manual talks of the 5 time settings (minute, hour, day, month,
    dayofweek) and then the command.However, the manual and the system
    crontab seems to have a "user" column:

    # run-parts
    01 * * * * root run-parts /etc/cron.hourly
    02 4 * * * root run-parts /etc/cron.daily
    22 4 * * 0 root run-parts /etc/cron.weekly
    42 4 1 * * root run-parts /etc/cron.monthly


    taken literally the hourly command should be:

    root run-parts /etc/cron.hourly

    But there is no "root" command. So I assume this is special field that
    tells cron which user to run the command under?

    I cannot find anything that describes this. Is my assumption correct?

    Phil

  2. Re: crontab question

    The user entry is valid only in the system crontab, i.e. /etc/crontab.
    Crontabs for individual users, typically in /var/spool/cron may not contain
    the user directive.


    Philip wrote:

    > I have a RH9 system. The crontab seems to have an extra column.
    >
    > The manual talks of the 5 time settings (minute, hour, day, month,
    > dayofweek) and then the command.However, the manual and the system
    > crontab seems to have a "user" column:
    >
    > # run-parts
    > 01 * * * * root run-parts /etc/cron.hourly
    > 02 4 * * * root run-parts /etc/cron.daily
    > 22 4 * * 0 root run-parts /etc/cron.weekly
    > 42 4 1 * * root run-parts /etc/cron.monthly
    >
    >
    > taken literally the hourly command should be:
    >
    > root run-parts /etc/cron.hourly
    >
    > But there is no "root" command. So I assume this is special field that
    > tells cron which user to run the command under?
    >
    > I cannot find anything that describes this. Is my assumption correct?
    >
    > Phil



  3. Re: crontab question

    Thanks, I missed the fine print in crontab (5).

    "Each line has five time and date fields, followed by a user name if
    this is the system crontab file"

    Sort of a buried and inside a conditional clause, but it is there.

    duh!

    Phil

    Jamie Beverly wrote:
    > The user entry is valid only in the system crontab, i.e. /etc/crontab.
    > Crontabs for individual users, typically in /var/spool/cron may not contain
    > the user directive.
    >
    >
    > Philip wrote:
    >
    >
    >>I have a RH9 system. The crontab seems to have an extra column.
    >>
    >>The manual talks of the 5 time settings (minute, hour, day, month,
    >>dayofweek) and then the command.However, the manual and the system
    >>crontab seems to have a "user" column:
    >>
    >># run-parts
    >>01 * * * * root run-parts /etc/cron.hourly
    >>02 4 * * * root run-parts /etc/cron.daily
    >>22 4 * * 0 root run-parts /etc/cron.weekly
    >>42 4 1 * * root run-parts /etc/cron.monthly
    >>
    >>
    >>taken literally the hourly command should be:
    >>
    >>root run-parts /etc/cron.hourly
    >>
    >>But there is no "root" command. So I assume this is special field that
    >>tells cron which user to run the command under?
    >>
    >>I cannot find anything that describes this. Is my assumption correct?
    >>
    >>Phil

    >
    >


  4. Re: crontab question

    Vixie wrote a great crond, but perhaps was a little rusty with the
    documentation (assuming he wrote the man page, which may not be true...)
    8-)


    Philip wrote:

    > Thanks, I missed the fine print in crontab (5).
    >
    > "Each line has five time and date fields, followed by a user name if
    > this is the system crontab file"
    >
    > Sort of a buried and inside a conditional clause, but it is there.
    >
    > duh!
    >
    > Phil
    >
    > Jamie Beverly wrote:
    >> The user entry is valid only in the system crontab, i.e. /etc/crontab.
    >> Crontabs for individual users, typically in /var/spool/cron may not
    >> contain the user directive.
    >>
    >>
    >> Philip wrote:
    >>
    >>
    >>>I have a RH9 system. The crontab seems to have an extra column.
    >>>
    >>>The manual talks of the 5 time settings (minute, hour, day, month,
    >>>dayofweek) and then the command.However, the manual and the system
    >>>crontab seems to have a "user" column:
    >>>
    >>># run-parts
    >>>01 * * * * root run-parts /etc/cron.hourly
    >>>02 4 * * * root run-parts /etc/cron.daily
    >>>22 4 * * 0 root run-parts /etc/cron.weekly
    >>>42 4 1 * * root run-parts /etc/cron.monthly
    >>>
    >>>
    >>>taken literally the hourly command should be:
    >>>
    >>>root run-parts /etc/cron.hourly
    >>>
    >>>But there is no "root" command. So I assume this is special field that
    >>>tells cron which user to run the command under?
    >>>
    >>>I cannot find anything that describes this. Is my assumption correct?
    >>>
    >>>Phil

    >>
    >>



+ Reply to Thread