From owner-freebsd-questions Mon Nov 5 10: 5: 8 2001 Delivered-To: freebsd-questions@freebsd.org Received: from post.mail.nl.demon.net (post-11.mail.nl.demon.net [194.159.73.21]) by hub.freebsd.org (Postfix) with ESMTP id C288837B405 for ; Mon, 5 Nov 2001 10:05:04 -0800 (PST) Received: from [212.238.77.116] (helo=buffy.raggedclown.net) by post.mail.nl.demon.net with esmtp (Exim 3.33 #1) id 160o7L-0006oG-00 for freebsd-questions@FreeBSD.ORG; Mon, 05 Nov 2001 18:05:03 +0000 Received: by tanya.raggedclown.net (Ragged Clown Mailhost, from userid 500) id D03D011F7; Mon, 5 Nov 2001 19:04:46 +0100 (CET) Date: Mon, 5 Nov 2001 19:04:46 +0100 From: Cliff Sarginson To: freebsd-questions@FreeBSD.ORG Subject: Re: A cron job to run every 4 weeks Message-ID: <20011105190446.B5055@raggedclown.net> References: <20011105161130.C3639@raggedclown.net> <512fe501a6.501a6512fe@mbox.com.au> <3.0.5.32.20011105075659.01006480@mail.sage-american.com> <008201c16607$1e2f5ff0$fa01a8c0@ABERRATION> <20011105161130.C3639@raggedclown.net> <20011105163350.A4161@raggedclown.net> <3.0.5.32.20011105095910.01006480@mail.sage-american.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.16i In-Reply-To: <3.0.5.32.20011105095910.01006480@mail.sage-american.com>; from jacks@sage-american.com on Mon, Nov 05, 2001 at 09:59:10AM -0600 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, Nov 05, 2001 at 09:59:10AM -0600, jacks@sage-american.com wrote: > Cliff: What exactly would the "at" lines be that preceded a command, as an > example.... I would be interested in that myself. > Here is an example: # An "at" job that re-runs itself every 4 weeks # Command example is "date" # This should set up the at job for the future, # then run the date command at -f $0 now + 4 weeks date # End of example Then using "atq" you see: 1 2001-12-03 18:57 a root Today is November 5th November 5th + 4 weeks = December 3rd The initial run can be specified on the first invocation, say the script is called "foo" at -f foo time_spec See the manual page for details of "time-spec", it has some extensive options (even bizarre ones like "teatime" I seem to recall). -- Regards Cliff To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message