“Every Other Week” timer not working


1) Give a description of the problem
Piston that is supposed to function every 2 weeks is firing every week.

2) What is the expected behavior?
Piston should fire every OTHER Thursday

3) What is happening/not happening?
Piston is instead firing every Thursday .

**4) Post a Green Snapshot of the piston

/* webCoRE Piston XXXXXXX

every other Thursday , at 8:04:00 PM
Set location mode to XXXXXXXX;
end every;
end execute;

5) Attach any logs (From ST IDE and by turning logging level to Full)
No need for logs; they confirm the piston is firing every Thursday instead of every other Thursday.

If a solution is found for your question then please mark the post as the solution.


Logs would help… even if you say they just show it’s firing every week.

Also, piston snapshot instead of sudo code would also be better.


Not necessarily true. If it’s set to fire every other Thursday, it will ‘fire’ every Thursday. The difference is in whether or not the Location is set or not. It may just be firing and saying “it’s the wrong Thursday… setting wake-up timer for next Thursday at 8:04pm”.


Thanks for that thought. Problem is it’s setting the mode each and every Thursday.
But I’ll send a log later.


Here’s the log from the last event. I don’t have previous logs as I have stopped and restarted in an attempt to make things work, but they look identical each time

+0ms ╔Received event [myhome].time = redacted Epoch Time with a delay of -505ms
+444ms ║RunTime Analysis CS > 28ms > PS > 375ms > PE > 42ms > CE
+447ms ║Runtime (38727 bytes) successfully initialized in 375ms (v0.2.102.20180116) (446ms)
+448ms ║╔Execution stage started
+463ms ║║Cancelling statement #2’s schedules…
+529ms ║║Executed virtual command setLocationMode (62ms)
+532ms ║╚Execution stage complete. (84ms)
+534ms ║Setting up scheduled job for Thu, Feb 1 2018 @ 8:04:00PM EST (in 604799.971s)
+545ms ╚Event processed successfully (545ms)


What was the trigger?

Looks like it fired redacted Epoch conversion (redacted Epoch time) but your piston is scheduling for Thursdays???

Are you using the test button?


As this is a security-related piston, I find it imprudent to post the real time and day on which this is happening. So I have changed the dates and times. I was kinda hoping you would not look at the UTC time lol


oops lol

Have you tested this through a whole week to see if it actually changes mode next week or just runs to re-schedule for the second (correct) week.


I redacted the Epoch times above and hid the revisions in the history…


It does change the mode as desired.
Problem is it does this every week - instead of every other week. The log each week looks identical to what I posted.


can you send me a PM with the green piston snapshot… probably nothing new to see but worth a look.


Done. Thx

A PITA to do on the iPad lol


Did you guys figure this one out, I’m seeing the same thing.


My first thought is, I avoid using “Every other week”, because each time that piston is edited, it “resets” the two-week timer…

I would probably code logic based on whether it is an even or odd “week of the year”… For example the following returns an integer between 1 and 54:

formatDateTime($now, 'w')

Currently returning “49”


This way, no how many times I edit the piston, it stays accurate all year long. (it may need a 5 second tweak the first week of January, or you can code more complex to catch that as well)


Yeah that idea is awesome. Thanks


Was unaware of this bug and need for workaround until I tried to use it, and about to post this exact issue.

After 4 years, I assume no one cares to fix the fact that every 2 weeks trigger actually fires every week? It is still happening…I thought it was the editing thing but had the discipline not to touch it for 2 weeks and same behavior. Logic is clearly broken in Webcore.

I assume every 3, 4, etc. weeks also not possible and require our own workarounds.

Every other (2) week trigger broken

do an hpm repair on webcore on HE, and let me know if it works (may take you 2 weeks to give me feedback.


Thanks, Eric. Will do, and understood about 2 weeks - have been trying to troubleshoot for awhile now because of this…