How to make 2 macros not run at the same time?

Sorendere

New member
I have a macro that works like this:

- Receive "X" app notification
- Executes the Macro action that takes approximately 18 seconds.

But if I get another notification in those 18 seconds, it runs again and doesn't do either correctly and "breaks"

Is there a solution so that one is executed first and when it is finished the other is executed?


Thank you very much.
 

Lupus52

Member
Hi,

As the first action in the macro set a variable named for example as "Running" to true
As the last action in the macro set this variable to false

Set the start condition to: if variable "Running" is false.

You should even set the variable to false when MD inits.
 

Endercraft

Moderator (& bug finder :D)
Hi,

As the first action in the macro set a variable named for example as "Running" to true
As the last action in the macro set this variable to false

Set the start condition to: if variable "Running" is false.

You should even set the variable to false when MD inits.
Is there a solution so that one is executed first and when it is finished the other is executed?
This will require a bit more of complexity than that but will be achievable (however if you need to pass variables too it will be harder).
 

fmcpma

Member
Another solution is to make use of the constraint Macro(s) Invoked/Not Invoked Recently, in section Macrodroid Specific.

Set first option to Not Invoked, second option to [This Macro] and in the third set the time you want between invocations of the macro – in your case, maybe 20, 30 seconds. Of course, you must be sure that such interval is sufficient; otherwise, your problem remains ;-)
 
Top