Subject: Re: Monthly Job, once-only: How?
To: Bruce Lane <kyrrin@bluefeathertech.com>
From: Johnny Billquist <bqt@update.uu.se>
List: port-vax
Date: 02/25/2001 20:47:06
On Sun, 25 Feb 2001, Bruce Lane wrote:

> Fellow VAX'ers,
> 
> 	I have a job in my crontab that I want to run once only on the 25th day of
> every month. The entry (NetBSD 1.5) looks like this.
> 
> -=-=-=-=-=-=-=-=- <break> 
> 
> # 50     *       25      *       *       /usr/local/apache/conf/rc.monthly
> 
> -=-=-=-=-=-=-=-=- <break>
> 
> 	The reason it's commented out right now is because I discovered it was
> running at 50 minutes past every hour on this day (which is indeed the 25th).

As it should...

> 	I only want the job to run ONCE on the 25th, every month. Is this even
> possible with cron? Perhaps I need to use at or batch?
> 
> 	The man pages and my dead-tree archives haven't helped much.

Well, perhaps if you thought a bit more about it... :-)

cron looks in the tables once every minute. If a line matches, it is
executed. If you put an '*' on the hour mark, every hour matches...

If you only want it to run once every month, you'll have to specifically
say *when* it should run, leaving only the month and weekday as
wildcards...

	Johnny

Johnny Billquist                  || "I'm on a bus
                                  ||  on a psychedelic trip
email: bqt@update.uu.se           ||  Reading murder books
pdp is alive!                     ||  tryin' to stay hip" - B. Idol