tburba on Thu, 21 Oct 1999 16:51:47 -0400 (EDT)


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [Plug] docs on /etc/crontab?





Excellent explanation. My thanks.




mental@NeverLight.com on 10/21/99 11:06:20 AM

Please respond to plug@lists.nothinbut.net

To:   plug@lists.nothinbut.net
cc:    (bcc: Thomas A Burba/USVISION)
Subject:  Re: [Plug] docs on /etc/crontab?




Here's some bits of `man 8 crond` and `man 5 crontab`. Its all there.
It explains that the system crontab has the 5 time fields, a username
(to run as) then the command. /usr/bin/run-parts takes a directory
name as the argument. Its all there. Its pretty much the same exact
format, except for the fact that they system file can run different
jobs as different users. YOu obviously cant do this with normal crontabs
due to... well.. duh.
Cron  searches /var/spool/cron for crontab files which are
named after accounts in /etc/passwd;  crontabs  found  are
loaded  into  memory.  Cron also searches for /etc/crontab
and the files in the /etc/cron.d/ directory, which are  in
a  different  format (see crontab(5)).  Cron then wakes up
every minute, examining all stored crontabs, checking each
command  to see if it should be run in the current minute.


The format of a cron command is very much the V7 standard,
with  a number of upward-compatible extensions.  Each line
has five time and date fields, followed by a user name  if
this  is  the  system crontab file, followed by a command.
Commands are executed by cron(8) when  the  minute,  hour,
and  month of year fields match the current time, and when
at least one of the two day fields (day of month,  or  day
of  week)  match  the  current  time (see ``Note'' below).
Note that this means  that  non-existant  times,  such  as
"missing  hours"  during daylight savings conversion, will
never match, causing jobs scheduled  during  the  "missing
times"  not  to  be run.  Similarly, times that occur more
than once (again, during daylight savings conversion) will
cause matching jobs to be run twice.




Mental
--
"If they takeaway the pr0n, the net will stagnate...who's gonna need
bandwidth then?  I mean...why do you think they went from 16 to
256 colors?  for reading?  I think not!" --Kyle Burton

On Thu, 21 Oct 1999 tburba@GLCORPIS01.usvision.com wrote:
>
>
>
>
> The entry:
>      0 3 * * * /usr/bin/rdate -s hostname
> does nothing in /etc/crontab, but works fine in root's crontab. I've
> noticed that /etc/crontab has this entry:
>      01 * * * * root run-parts /etc/cron.hourly
> To quote the man page, "The 'sixth' field (the rest of the line)
specifies
> the command to be run". By inference, the field "root run-parts
> /etc/cron.hourly" is a shell command. How can both these formats be the
> same?
>
>
>
>
> mental@NeverLight.com on 10/21/99 09:59:54 AM
>
> Please respond to plug@lists.nothinbut.net
>
> To:   plug@lists.nothinbut.net
> cc:    (bcc: Thomas A Burba/USVISION)
> Subject:  Re: [Plug] docs on /etc/crontab?
>
>
>
>
> It has the same exact format. Check out "man 5 crontab" and read up
> on all the settings you can use.
> What was it you were wondering about?
>
>
> Mental
> --
> "If they takeaway the pr0n, the net will stagnate...who's gonna need
> bandwidth then?  I mean...why do you think they went from 16 to
> 256 colors?  for reading?  I think not!" --Kyle Burton
>
> On Thu, 21 Oct 1999 tburba@GLCORPIS01.usvision.com wrote:
> >
> >
> >
> >
> > The man pages don't seem to explain about /etc/crontab which looks to
> have
> > a slightly different format than a normal crontab file. Normal crontab
> > formatted stuff doesn't seem to work here. Can anyone shed light on
this?
> > TAMIA
> >
> >
> >
> > _______________________________________________
> > Plug maillist  -  Plug@lists.nothinbut.net
> > http://lists.nothinbut.net/mail/listinfo/plug
> >
>
> _______________________________________________
> Plug maillist  -  Plug@lists.nothinbut.net
> http://lists.nothinbut.net/mail/listinfo/plug
>
>
>
>
>
>
>
>
> _______________________________________________
> Plug maillist  -  Plug@lists.nothinbut.net
> http://lists.nothinbut.net/mail/listinfo/plug
>

_______________________________________________
Plug maillist  -  Plug@lists.nothinbut.net
http://lists.nothinbut.net/mail/listinfo/plug








_______________________________________________
Plug maillist  -  Plug@lists.nothinbut.net
http://lists.nothinbut.net/mail/listinfo/plug