Random trigger timer please...

FrameXX

Well-known member
With a little bit of creativity you can do this by yourself. There's just 1 thing you need to know.

How often do you want your trigger to randomly fire on average?

Let's say 1 hour.

There are 2 ways I think we could approach this.

The simpler (and I think better) way is to use a fixed time interval trigger and set it for example to 1 minute. This way we know that the trigger will fire 60 times in a hour. Now everytime the trigger fires We will set a variable to a random number from 1 to 60. Then if the variable == 60 we will perform our actions as if our random trigger fired.

This way you will get truly random time trigger firing on average every 1 hour, the only restriction being that the random time trigger is limited to firing only in the 1 minute intervals and not anywhere in between.
 
Last edited:

Qarboz

Well-known member
With a little bit of creativity you can do this by yourself. There's just 1 thing you need to know.

How often do you want your trigger to randomly fire on average?

Let's say 1 hour.

There are 2 ways I think we could approach this.

The simpler (and I think better) way is to use a fixed time interval trigger and set it for example to 1 minute. This way we know that the trigger will fire 60 times in a hour. Now everytime the trigger fires We will set a variable to a random number from 1 to 60. Then if the variable == 60 we will perform our actions as if our random trigger fired.

This way you will get truly random time trigger firing on average every 1 hour, the only restriction being that the random time trigger is limited to firing only in the 1 minute intervals and not anywhere in between.
To make it even more granular, when the trigger is fired you can use the "Wait Before Next Action" action using an integer variable set with random value 0...59
 

wojtek

New member
With a little bit of creativity you can do this by yourself. There's just 1 thing you need to know.

How often do you want your trigger to randomly fire on average?

Let's say 1 hour.

There are 2 ways I think we could approach this.

The simpler (and I think better) way is to use a fixed time interval trigger and set it for example to 1 minute. This way we know that the trigger will fire 60 times in a hour. Now everytime the trigger fires We will set a variable to a random number from 1 to 60. Then if the variable == 60 we will perform our actions as if our random trigger fired.

This way you will get truly random time trigger firing on average every 1 hour, the only restriction being that the random time trigger is limited to firing only in the 1 minute intervals and not anywhere in between.
Very good idea. Thank you. Strange that I didn't come up with that myself. I am no stranger to combinatorics and random numbers. I need intervals from 5 to 15 minutes. The script works in a server placed on a home smartphone and supports api. All this to cheat the "cloudflare" server blockade.

best regards...
-- Wojtek
 
Top