If you have a start date you could:

- loop over the date from start date to now, doing a dateadd 1 day each 
iteration
- every time the date hits sunday, add 1 to a counter
- at the end, check if the counter is even or odd, and run scheduled task 
accordingly.

-- Josh



----- Original Message ----- 
From: "Ian Skinner" <[EMAIL PROTECTED]>
To: "CF-Talk" <cf-talk@houseoffusion.com>
Sent: Tuesday, January 30, 2007 9:08 AM
Subject: Bi-weekly scheduled task.


>I have a task that needs to run every other Thursday.  Since the scheduled 
>task administrator does not have bi-weekly option, I'm expecting I will run 
>it every week and then have logic on the page determine if this is an "on" 
>week or an "off" week.
>
> My question is how you all would tackle this.  I have a couple different 
> ideas, and I am having a hard time settling on one I like.
>
> Idea 1:  A flag that flips back and forth, but will need some method to 
> persist the flag through system restarts and such.  Seems a bit overkill 
> to create a database or file just to store single binary 0|1 value.
>
> Idea 2: Process the date to determine if the task should run this week, 
> but how?
>
> Idea 2a:  Could I use the week() function?  But I don't think the task 
> will always run on even or odd weeks every year, would it?
>
> But if not this, what characteristic of a date would determine which week 
> to run the code.  I have a 'start' date if that helps.
>
>
> --------------
> Ian Skinner
> Web Programmer
> BloodSource
> www.BloodSource.org
> Sacramento, CA
>
> ---------
> | 1 |   |
> ---------  Binary Soduko
> |   |   |
> ---------
>
> "C code. C code run. Run code run. Please!"
> - Cynthia Dunning
>
> Confidentiality Notice:  This message including any
> attachments is for the sole use of the intended
> recipient(s) and may contain confidential and privileged
> information. Any unauthorized review, use, disclosure or
> distribution is prohibited. If you are not the
> intended recipient, please contact the sender and
> delete any copies of this message.
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:268078
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to