[oclug] rsync, ssh, and cron
Matthew Wilcox
willy at debian.org
Thu Apr 8 12:40:27 EDT 2004
On Wed, Apr 07, 2004 at 11:25:31PM -0400, Michael P. Soulier wrote:
> On 07/04/04 Dave Edwards did speaketh:
> > I think we must be talking at each other. That man page doesn't have
> > anything to say about /etc/cron.d; it mentions /etc/passwd twice and
> > /etc/crontab once.
>
> Apparently, the crond(8) manpage references the crontab(5) manpage for
> information about the special format of those files, but that referenced
> manpage says nothing about it. Lovely.
Does so!
The format of a cron command is very much the V7 standard, with a num‐
ber of upward‐compatible extensions. Each line has five time and date
fields, followed by a command, followed by a newline character (’\n’).
The system crontab (/etc/crontab) uses the same format, except that the
username for the command is specified after the time and date fields
and before the command. The fields may be separated by spaces or tabs.
Note that if the line does not have a trailing newline character, the
entire line will be silently ignored by both crontab and cron; the com‐
mand will never be executed.
Now, it doesn't mention /etc/cron.d/ at all, but this is mentioned in cron(8):
cron also reads /etc/crontab, which is in a slightly different format
(see crontab(5)). Additionally, cron reads the files in /etc/cron.d:
it treats the files in /etc/cron.d as extensions to the /etc/crontab
file (they follow the special format of that file, i.e. they include
the user field).
> --
> OCLUG general discussion list
> OCLUG at lists.oclug.on.ca
> http://www.oclug.on.ca/mailman/listinfo/oclug
--
"Next the statesmen will invent cheap lies, putting the blame upon
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince
himself that the war is just, and will thank God for the better sleep
he enjoys after this process of grotesque self-deception." -- Mark Twain
More information about the OCLUG
mailing list