Schedule - fire piston every other Thursday?


#1

We have a cleaning service that comes to clean our home every other Thursday.

I’m using Lock Manager to authorize their code every Thursday. I wish to limit it to only those thursdays when the service actually comes, but lock manager’s scheduler is not that robust.

It occurs to me that I could possibly use webcore to set a mode every other Thursday, as Lock Manager also allows limits based on modes. The ‘action’ to accomplish that is simple. Being new to webcore, I just don’t know how to write the ‘if’ statement to get it done every other Thursday.


#2

Here’s what I did for the alternating trash/recycling pickup weeks.

tl;dr I use 1 / -1 as logic and multiply by -1 once a week.

Edit : @c1arkbar solution seems simpler, use his idea :slight_smile:


#3


Just add your actions in. Leave the set variables. You will need to manually set the variable for the correct Thursday from the piston view page (you will only need to do this to get the ball rolling) after that it will be automatic


#4

Sorry, I should have been clearer.
The ‘timer’ function does allow the exact statement “every other Thursday, at 9am”.

But how do I determine which is the Thursday that gets the action? Does it presume that this coming Thursday, the first one after I’ve written the script, is the day that should get the action? Or does it presume this coming Thursday is the ‘off’ day?


#5

Create it and see when it is next scheduled.

I didn’t see the option for every other. Unless you are talking about selecting only odd weeks or even weeks?


#6

I actually already did that, as you were typing it. Lol Tested it, and the log says it’s next scheduled for sept.7.
So all is well.

When you’re doing a timer, you can add “every 2 weeks” and it alternates weeks odd/even for you.

Thanks for the assist, folks!


#7

Wow right in front of me. Haha thanks!