In theory there is no limit to the number of concurrent macros that can be run as well as no way to stop a running macro short of purging all macros from AHP.
There are some tricks you can do with flags, however. Here's an example that might help you.
- Start by defining a dummy module M2
- Then build a macro to trigger on "M1 ON" with these steps.
- Is flag 1 set? Only executes macro if its not already being used
- Set flag 1
- Set flag 2
- Delay 90 minutes
- M2 on
- Then build a macro to trigger on "M2 ON" with these steps.
- Is flag 2 set? Only executes macro if flag is set.
- Turn off lights
- Clear flags 1 & 2
- Then build a macro to trigger on "M1 OFF" with these steps.
The above may need a bit of tweeking but basically it should work. (Some don't like to use HC "M" but I like it because I can remember M for macro. I've also never had any problems with using it myself.)
Ok here's what happens...
A press of the button starts macro M1 ON. Once started the test for flag 1 prevents it from being started again. After 90 minutes M1 ON turns on module M2 which in turn starts the M2 ON macro. (A macro can't call another macro but it can trigger a module that in turn does. This is why the dummy module must be defined.) If at any time you decide you don't want M2 ON macro to be executed, running M1 OFF will clear flag 2 and stop it.
Note: The above is not perfect. e.g. If you started the timer by pressing M1 ON at say 9:00 pm and then changed your mind at 9:30 pm and pressed M1 OFF and then at say 10:00 pm pressed M1 ON again, you would have two timers running. The first to finish, the one you started at 9:00 pm, would take priority and it's lights out at 10:30 pm. (9:00 pm + 90 minutes.)