Date: Fri, 20 Jul 2001 09:37:41 +1000 From: Tony Landells <ahl@austclear.com.au> To: Mark Thomas <thomas@pbegames.com> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Crontab - Biweekly events? Message-ID: <200107192337.JAA04489@tungsten.austclear.com.au> In-Reply-To: Message from Mark Thomas <thomas@pbegames.com> of "Thu, 19 Jul 2001 17:53:13 -0400." <5.1.0.14.2.20010719175024.02510170@pbegames.com>
next in thread | previous in thread | raw e-mail | index | archive | help
thomas@pbegames.com said: > I have a task I want to run every other week on a specific day, say > Tuesday. I can't see a way to convince cron to do this. Anyone know > how? You can't. Cron doesn't support this. However, what you can do is wrap your stuff in a script that either creates a "flag" file somewhere (if it doesn't exist) and runs your stuff or deletes the flag file (if it exists) and exits. Then run that every Tuesday from crontab. Alternatively, you can use "at" to schedule the job initially, and then have it reschedule itself for two weeks time. You probably want it to email you a reminder that it's rescheduled itself too... Actually, I like the first one a lot, since you could also use it for every second day, month, ... Actually, a generic "wrapper" could even be made to run the task every <arbitrary number> of days/weeks/years/... Tony -- Tony Landells <ahl@austclear.com.au> Senior Network Engineer Ph: +61 3 9677 9319 Australian Clearing Services Pty Ltd Fax: +61 3 9677 9355 Level 4, Rialto North Tower 525 Collins Street Melbourne VIC 3000 Australia 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?200107192337.JAA04489>