Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 04 May 2000 21:50:26 -0700
From:      Doug Barton <DougB@gorean.org>
To:        Doug Young <dougy@gargoyle.apana.org.au>
Cc:        Jonathan Chen <Jonathan.Chen@itouch.co.nz>, freebsd-questions@freebsd.org
Subject:   Re: "bad day_of_the_month" (yes really !!!) cron questions
Message-ID:  <39125312.725B8355@gorean.org>
References:  <018e01bfb62c$58481b00$847e03cb@ROADRUNNER> <20000505131420.A798@jonc.itouch.co.nz> <01aa01bfb632$612c3390$847e03cb@ROADRUNNER>

next in thread | previous in thread | raw e-mail | index | archive | help
Doug Young wrote:
> 
> Thanks Jonathan
> 
> > There's root's crontab, and then there's the system's crontab. On a
> > fresh install, there are no crontabs for root; but there is a system
> > crontab in /etc/crontab.
> 
> OK .... so far so good
> 
> > The format for the personal crontab vs the system crontab differs. The
> > system has an extra run-as-user field.
> 
> OK .... that shouldn't be a problem since the job I have in mind doesn't
> need to be messed with by users ... as long as I can configure it remotely
> thats all I need
> >
> > > I then tried running "crontab crontab", but that just told me
> > > "crontab":0: bad day_of_month
> > > crontab: errors in crontab file, can't install
> >
> > This tends to indicate an error in your crontab file format. If you
> > send it to the list, betcha we can find out what it is.
> 
> attached hereto .

	You attached /usr/bin/crontab. Please don't get me wrong, but you
_really_ need to learn how to read man pages if you're going to have any
chance at all administering freebsd. The element you probably missed is
in the cron manpage where it tells you to go to crontab(5) to see the
format. That means that you use the following command:

man 5 crontab

to look at the crontab entry in section 5 of the manual. 

	What cron does is run the command you specify at the time you specify
it. The stuff on the left hand side tells cron when to run the command,
which you specify on the far right hand side. The easiest way to
accomplish what you want is to first write a script that does what you
want it to do (mailing the logs, and such). Then read crontab(5) to
figure out how to make it run when you want it to run. 

	You probably want to spend some time reading the handbook and FAQ that
are available on the web page. It will help you with some of the basics,
and put you on the road to learning more.

Good luck,

Doug
-- 
Excess on occasion is exhilarating.  It prevents moderation from
acquiring the deadening effect of a habit.
                -- W. Somerset Maugham


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?39125312.725B8355>