--- Alan Young <[EMAIL PROTECTED]> wrote:
> I hit send by accident.
> 
> > Also, how would you get it to run on odd weeks instead of even?
> 
> You'd have to check in your program and have it exit unless it
> meets your criteria.
> 
> Here's a simple formula for determing what week of the month your
> in:

That would work OK for week of the month, but what I need in this
case is "every other week", regardless of where it falls in the
month.  The crontab entry I originally posted appears, after a
minimal amount of testing, to do what I want for December 2004,
but I'm not sure it will work in other months.

I ended up, against my preference (*), writing a script using
Date::Calc which will work for the rest of 2004 (where I need
even weeks) and 2005 (which, as it turns out, needs odd weeks,
because 2004 has 53 weeks the way Date::Calc figures things).
I'll have to add another condition to the script sometime in the
next year to handle 2006.

- Gary

(*) Nothing against Date::Calc, mind you, I just hoped to get the
functionality I needed from cron without writing any additional
script at all.


=====
PGP Key ID: 071B173D
Fingerprint: ED30 B048 6833 56B4 28C0 CE52 F12B 884A 071B 173D

--------------------
BYU Unix Users Group 
http://uug.byu.edu/ 

The opinions expressed in this message are the responsibility of their
author.  They are not endorsed by BYU, the BYU CS Department or BYU-UUG. 
___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list

Reply via email to