Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Oct 2000 21:47:29 -0700
From:      "Crist J . Clark" <cjclark@reflexnet.net>
To:        Mike Meyer <mwm@mired.org>
Cc:        George Yobst <george@lincc.lib.or.us>, questions@FreeBSD.ORG
Subject:   Re: Cron question
Message-ID:  <20001011214729.J25121@149.211.6.64.reflexcom.com>
In-Reply-To: <14820.46059.743717.697477@guru.mired.org>; from mwm@mired.org on Wed, Oct 11, 2000 at 01:39:39PM -0500
References:  <14344580@toto.iv> <14820.46059.743717.697477@guru.mired.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Oct 11, 2000 at 01:39:39PM -0500, Mike Meyer wrote:
> George Yobst writes:
> > Hi all,
> > How do I get cron to start a job on the first Sunday of the month?
> > Thanks  -George
> 
> By starting a wrapper every Sunday. The wrapper checks that the day of
> month and launches your job if it's less than 8:
> 
> 	if [ `date +%d` -lt 8 ]; then
> 		realjob
> 	fi
> 
> That's small enough to imbed in a cron file if you really wanted to.

Or if you want to be 3l33t, you can cut that to,

  [ `date +%d` -lt 8 ] && realjob

-- 
Crist J. Clark                           cjclark@alum.mit.edu


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?20001011214729.J25121>