Periodic Trigger that will fire if missed?

I would like to trigger a certain macro every Monday at 9am only if a certain application is running. But in the event that the app isn’t running at 9am on Monday, I’d like the macro to run at first launch of the app after this day/time.

Alternatively, it would work for me to just trigger the macro only on the first launch of the app on Mondays.

Any suggestions on how to do this?

Hey Rick,

You can't.

But you can trigger the macro at that time and execute actions ONLY IF the app in question is running (see appended example).

You'll probably have to assign a variable like mondayMacroHasBeenRun to TRUE or FALSE (as appropriate).

Then use another macro with an Application Launches trigger to monitor your app.

That should give you food for thought.

Play around with it, and holler if you beat your head against the wall for very long.


If Then Else.kmactions (1.0 KB)

Got it figured out. First launch on Mondays even better than 9am on Mondays. Here it is:

1 Like

Do you mind sharing the macro-file or the AppleScript-code?
I think this could be usefull for me as well.

Don't mind at all. Here's the macro:

Delete Old Completed Tasks.kmmacros (24.4 KB)

Here's the applescript:

Delete old completed (6.4 KB)

I have almost 100 KM macros to deal with Outlook's shortcomings. Let me know if there's anything else you need.


Wow! Sounds like you've done some real work.

If it's not too much trouble, would you mind posting a list of your Outlook macros?


Sure. Here is the list with annotations. Some may require further explanation; just ask. Let me know if you'd like me to post any of the macros or scripts.

Outlook (49.5 KB)

Many thanks!