"Happens on 2/3 random days of the week..."


#1

As the title says, I’m trying to turn on a switch randomly two or three times a week, on randomly changing days.
I see “Happens daily at…”
If someone has an idea I’d be grateful, it will probably involve an expression I’m guessing.


#2

Could you use Wait Randomly? Seems like you could make something like what you are looking for with that, but I’ve never tried it.


#3

That option doesn’t come as a trigger, I need this to be a continuously rolling piston you see.


#4

I am not sure of your application, but why not just do a random 35% every day at noon?
That should fire up 2-3 days a week (on average)


#5

Hi @WCmore
I can’t picture how a trigger of random 35% every day at noon would look, although it looks like it could help me.
Specifically I’m trying to do a vacation piston for my tv.
So every random 2 or 3 days of a week,
At a random time between 8pm and 9pm
Turn tv on, for a random time between 1 hour and 1.5 hours.


#6

Yeah, I was just thinking you could use that to set a variable, and then fire what you want when the variable changes. Probably wouldn’t work though.


#7

Seems like you could fire every night at 8, generate a random number 1-3, then only if it is 1, then you do a random wait, turn on, random wait, turn off something like this:

Every day at 8 pm
Do
   Set irun = random(1,3)
End every 
If irun is 1 then
  Wait random(60) minutes
  Turn on
  Wait random(60,90) minutes
  Turn off
End if

#8

Thank you very much @guxdude, that’s perfect!


Wow, never seen this before.