How to set a time trigger for every 56 hours

I made a macro for my printer that prints a test sheet. I only want it to print every 56 hours (to save ink for the specific printer).

With the Periodic trigger, it only seems to work in 24 hour MAX intervals since “On these days” are part of the Periodic trigger (where you have to select days). I thought of doing "Repeating every 56 hours, Between 12:00am and 11:59pm (or 12:00am), with ALL days selected, but this doesn’t really make sense.

In other words, because “Between” and “On these days” are part of the Periodic trigger, I can’t simply just use the “Repeating every” section by itself, which would solve my problem.

Am I missing something?

Please help. Thanks.

Which KM version are you using?

According to the Version 7.0 Change Notes you can set up to 9999 hours in Periodic Trigger. I haven’t tried it though.

Rather than trying to get the macro to trigger ever 56 hours, I would suggest you have the macro remember when it last performed the task, and then only perform it if enough time has elapsed. Then you can trigger the macro as frequently as you want (once a day, or once an hour, or whatever).

So something like:

  • if variable Last Test Print Time is empty
    • Set variable Last Test Print Time to NOW()
  • If calculation NOW() > Last Test Print Time + 3600*56
    • Perform test print
    • Set variable Last Test Print Time to NOW()

Hi Peter,

assuming that a “real” 56-hours trigger works also, what is the advantage of your solution with the time variable?

If I want to run the macro every 56 hours then I would have to set the trigger to Every 1 Hour. The macro then would execute 55 times just to test the time variable and close again.

So, wouldn’t it be more economic to set a “real” 56-hours trigger?

I'd have to look at the code to be sure, but the trigger triggers based on the start time and then every N seconds after that. For example, if you are triggering every two hours from 7am to 12noon, it will trigger at 7am, 9am, and 11am.

I'm not sure what result that will give you for anything more than 24 hours.

There are also concerns as to what would happen if you relaunched the Keyboard Maestro Engine (restarted for example).

All of these are removed by more clearly specifying what you want to do and when you want to do it.