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

Re: Problems with a bash script and cron



	Subject: Re: Problems with a bash script and cron
	Date: Fri, Oct 13, 2000 at 01:34:30PM +0200

In reply to:Felix Hagemann

Quoting Felix Hagemann(fx@coop-x.de):
> Wayne Topa <wtopa@dmcom.net> writes:
> 
> > > > My crontab looks like this:
> > > > 
> > > > 0,15,30,45 * * * /home/laban/bin/chkwww
> > 
> > so you might try
> > 0,15,30,45 * * * * /home/laban/bin/chkwww
> 
> The `user` field exists only in the systemwide /etc/crontab.  The
> user-owned crontabs obviously don`t need the entry.  But I don`t have
> the original article to check which one he referred to.

I had _not_ suggested he required the user field.  Let me try this
again;

m          h dom mon dow
0,15,30,45 *  *   *

0,15,30,45 *  *   *   *

He does not have an entry for the 'day of the week' field .  I had never
tried using cron with less thæn the suggested argument fields, so I
tested it.  A working example was changed to his, dow missing,
example.

(working example)
15,45 8-22 * * * root /usr/local/bin/play /usr/lib/sounds/ring.au

(Test without 'dow' field)
1-20 8-22 * *  root /usr/local/bin/play /usr/lib/sounds/ring.au 

The test did not work. As I read crontab(5) it shouldn't work.
"
       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).
       cron(8) examines cron entries once every minute.  The time
       and date fields are:

   [ snip field parameters]

       A  field  may  be an asterisk (*), which always stands for
       ``first-last''.

"
Adding the dow field to the above test example, did in fact, work.

I guess my original post
># m h dom mon dow user  command

>so you might try
>0,15,30,45 * * * * /home/laban/bin/chkwww
>                 ^

Was not clear enough (?).
-- 
Real programmers don't write in BASIC.  Actually, no programmers write
in BASIC after reaching puberty.
_______________________________________________________



Reply to: