Set Interval

I'mnoob

Member
I know there is an option to add interval but in my case I wanna setup like this:-
In triggers:-
Interval should be every 12h for first time
But 2nd time it should 12h+5m, third interval 12+10m and so on
 

Dm114

Well-known member
I know there is an option to add interval but in my case I wanna setup like this:-
In triggers:-
Interval should be every 12h for first time
But 2nd time it should 12h+5m, third interval 12+10m and so on
What kind of trigger do you use? Maybe you could use Stopwatch trigger instead.
 
Hi, I. Looks interesting.

First I'll share some thoughts about getting that trigger option instated, then I'll suggest a way to get the effect you're describing right away.

I can think of two imaginable reasons there's no such trigger option, seeing as it's probably been thought of. Either:
  1. UC hasn't gotten around to instating it, yet. Or...
  2. UC has deemed it unfeasible.
Therefore search the Feature Request board to see if it's come up. If not, I'd post in General MD Discussion to ask if anyone remembers something from further back. If nothing comes up, go back to Feature Requests and suggest this trigger option! :cool:

The Macro You Want
But maybe this'll do it for you.

Trigger: go to E for Empty Trigger, or MacroDroid Specific if you have "show categories" checked. Add comment to trigger to remind yourself it's your reset trigger.
OR pick a specific reset trigger if you have one in mind, OR skip above if you're sure you need never reset it.

Action: -> MacroDroid Specific -> set variable. Create an integer (I'll call mine i), select the Value option, and enter 43,200 (the number of seconds in 12 hours(. If you're not sure whether you'll want it to be global or local, make it global for now as that's simpler to change later.
Action Constraint: -> MacroDroid Specific -> Trigger Fired. Select your Empty Trigger or whatever you chose for your reset trigger.

Tap the trigger and select Test Trigger. Ensure that the variable i is now at 43,200.

Back to Triggers.

Trigger: scroll down to S for stopwatch, or find it under Date/Time triggers if you have "show categories" checked. You probably want a new stopwatch for this. The default is "fixed duration." Tap that arrow for the dropdown menu and change it to var (i) or var (whatever you named your integer).

(I've long been curious if/when there's merit to unchecking the "Use alarm" option.)

For this next part, you can copy/paste the Set Variable action from above.

Action: set variable i. Switch it from Value to Expression. You can use the three dots to magic-text your integer in, or you can write it manually. Then write in a plus sign and the number 300, being the quantity of seconds in five minutes. So your expression will be "[v=i] + 300" or "[v=your variable name] + 300"

Action: Stopwatch (Reset and Restart)

You may need to nest those two actions within an IF condition, depending on the purpose of your macro.
 
I know there is an option to add interval but in my case I wanna setup like this:-
In triggers:-
Interval should be every 12h for first time
But 2nd time it should 12h+5m, third interval 12+10m and so on
Did you accomplish what you were trying to?
 
Top