Multiple Triggers

This should be a common question but I didn't see it posted anywhere so here goes...... I want to use the AND condition as a trigger, for example a certain time and connected to my home network. It seems I can do both but only as an OR condition. Have I overlooked something?

Thanks in advance.

That's a fair question. The solution is fairly easy. And I even understand why you are asking the question.

The problem is that you are thinking of conditions as triggers. That's not the case. For example, you can't combine the following two triggers:

  • At 3pm
  • At 4pm

You can't combine them because obviously those two conditions can never occur at the same time. By the very definition of a trigger, which happens at a specific TIME, it's physically impossible for any two triggers to occur at the exact same time.

But I hear you, and you are saying "but I want to trigger at 3PM but only when some other condition is true". Well, the truth is the phrase "when some other condition is true" is not a trigger. It's a condition. And it's a condition you can easily test. That is, if you had a macro that triggered as follows:

  • At 3pm

Then the first thing you can do inside that macro is to test the condition, such as whether the home network meets your condition, and EXIT THE MACRO if the condition doesn't meet your requirements.

Here's a list of triggers. I can't think of ANY two triggers that could happen at the exact same time. Can you? (Well, I think I can spot one that theoretically could happen the same time as another, but it's really hard to find examples.)

Screen Shot 2022-03-01 at 10.56.11 PM

What you want is a condition that is TESTED, but AFTER the trigger occurs.

Here's an actual example from my macros which uses this technique:

In this example, my macro is triggered to activate every 20 seconds, but then at the top of my macro I check a condition, and the condition is "if the computer's idle time is under 5 seconds, then exit this macro". Using your methodology, you would want two conditions, a periodic condition (every 20 seconds) and a condition that says "IDLE<5". But really, the latter is not a trigger. It's a condition just listed in the trigger section of the macro. In KM, conditions go where they really belong, which is inside the macro. (In case anyone is wondering, this macro uses the FIND MY app in MacOS and notified me with an SMS message whenever one of my family members changes their location. Pretty sophisticated macro! I should probably upload it. but it feels creepy monitoring my family like this.)

1 Like

Thank you for a very thoughtful and informational response. I have done what you suggested and have a time based trigger and then a condition to check if I am attached to my home wifi if so execute an AppleScript if not post a notification that the backups were skipped.

Thanks again for your help and assistance.