Author |
|
ficklma1 Groupie
Joined: December 08 2007 Location: United States
Online Status: Offline Posts: 59
|
Posted: November 07 2008 at 16:27 | IP Logged
|
|
|
Hi PHer's,
I have a basic question around TimedEvents and offsets. I have a need for a TimedEvent to execute every other Wednesday. Every other Wednesday is my recycle day and I have a TTS annoucement to state "Today is recycle day. Please do not forget to place bin at curb."
I have a TimedEvent set to Wednesday with an offset of 20160, which should be every other Wednesday, correct? Unfortunately this event still fires every Wednesday.
Any ideas to what's going on? Better way to handle this, etc.?
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: November 07 2008 at 17:20 | IP Logged
|
|
|
Until there is a better answer, I would leave it at every Wednesday, but have the macro first check, then toggle, a Global Variable, i.e. FL REC. Make the starting value 1 if the next Wednesday is the day, and 0 if not.
The macro would be something like this...
Code:
jump if( "{FL REC}"=1, 1, 2)
tts "Today is recycle day. Please do not forget to place bin at curb."
Set Global FL REC if( "{FL REC}"=1, 0, 1) |
|
|
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: November 07 2008 at 21:10 | IP Logged
|
|
|
Couple of ways to do this. A generic way for bi-weekly freqeuency is to just enter a value of 20160 for the frequency. When you select a frequency of "Weekly", the actual value used is 10080 so bi-weekly is just double that. If you set the startdate to a Wednesday and the frequency to 20160, then this event will fire every other Wednesday. Consequently, if you set the startdate to a Friday, it'll fire every other Friday. No need to play with the offset value.
A more elegant way is to create a Timed Event formula for Every other Wednesday. Just open the PowerHome Explorer and navigate to Timed Event Formulas. Enter the following:
Every Other Wed
Every Other Wednesday
relativedate([REFTIME],1 * 14 + 4 - daynumber([REFTIME]) - if(daynumber([REFTIME]) = 4,0,7))
Next, navigate to Timed Events and your new "Every Other Wed" frequency will be in the dropdown and ready to go.
Dave.
|
Back to Top |
|
|
krommetje Super User
Joined: December 29 2004 Location: Netherlands
Online Status: Offline Posts: 695
|
Posted: November 08 2008 at 02:43 | IP Logged
|
|
|
Oh that is easy:
create on a wednesday a timed event with a frequency of 20160 and you are there.
Peter
Edited by krommetje - November 08 2008 at 02:43
|
Back to Top |
|
|