I created a piston to run my Goodnight routine only once, but this is not the case. It runs multiply times
All help will be greatly appreciated
I created a piston to run my Goodnight routine only once, but this is not the case. It runs multiply times
All help will be greatly appreciated
You’ve got your phone numbers displayed in this screenshot. Which is why it’s best to post a “Green” snapshot of a piston rather than doing a screen grab. You post a green snapshot from the green camera button which will automatically blank out those types of things.
Moving on…
This line is a problem.
Just create the variable. Don’t give it a specific value as it will start with that value at the beginning of every execution of this piston. The way you have it setup right now, it will NOT run on the 14th day of the month, but will run every other day.
You could also do something where you set a datetime variable at the top (again don’t set it with a specific value) and then compare $now to the value of the datetime variable.
Then within the body of the piston, when it runs set the new value of your datetime to something like 12 hours in the future. That should be enough to work based on the other conditions that you have in your piston.
set variable (whateveryoucallit) = (addHours($now,12))
The easiest solution for what you have is what @Mike1616 said… just don’t set LastDay to a value at the top of your piston where you define the variable. It gets set by your piston and will have the correct value after the first time your piston runs.
Then it will only run one time per day.
@Mike1616 Thanks a million for pointing out about the green snapshot.
I will adjust my variable to not have a specific value and see how it goes tonight.
Thanks again!
Yeah, make sure you adjust it to have NO value. I think the option is “none selected”. That’s what you want.