format of /etc/crontab?

Brooks Davis brooks at one-eyed-alien.net
Thu Jul 3 14:12:33 PDT 2003


On Thu, Jul 03, 2003 at 01:54:36PM -0700, Rich Morin wrote:
> The cron(8) man page (on my FreeBSD 4.7 system) says:
> 
>    Cron searches /var/cron/tabs for crontab files which are named after
>    accounts in /etc/passwd; crontabs found are loaded into memory.  Cron
>    also searches for /etc/crontab which is in a different format (see
>    crontab(5)).
> 
> The crontab(5) man page, however, says nothing about any differences in
> the file formats.  Instead, it appears to describe only the format that
> is used in /var/cron/tabs/* files.
> 
> I would like to know precisely how the format of /etc/crontab differs,
> but I can't find any man page that addresses this.  Help?

Hmm, cron(8) mentions that /etc/crontab is in a difference format and
refrences crontab(5), but you seems to be correct that crontab(5)
doesn't mention the differences.  I'm fairly sure the only difference is
the who field between the time and command specifications.  A bit of
digging in the cron code found this comment:

        /* this function reads one crontab entry -- the next -- from a file.
         * it skips any leading blank lines, ignores comments, and returns
         * EOF if for any reason the entry can't be read and parsed.
         *
         * the entry is also parsed here.
         *
         * syntax:
         *   user crontab:
         *      minutes hours doms months dows cmd\n
         *   system crontab (/etc/crontab):
         *      minutes hours doms months dows USERNAME cmd\n
         */

-- Brooks

-- 
Any statement of the form "X is the one, true Y" is FALSE.
PGP fingerprint 655D 519C 26A7 82E7 2529  9BF0 5D8E 8BE9 F238 1AD4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20030703/0f6b33c9/attachment.bin


More information about the freebsd-questions mailing list