"1-Time Action" Macro (v9.0) - Set a macro to run just once, at a specific time

This is a fairly simple one, but I can see myself using it repeatedly.

There is a Unix command called at which is supposed to run whatever command you want at a specific time (hence the name).

For reasons which I do not understand, at no longer works in recent versions of macOS. I've tried various suggestions that I found across the Internet, but I did not succeed. The time spent exceeded the usefulness of the tool (at was never a great tool, it was just an easy one.)

Today I had need of such functionality again, and decided I wanted to try to use Keyboard Maestro to fix it.

In my particular use-case, I needed to open a specific URL for a Zoom¹ meeting at a specific time so I wouldn't be late for the meeting, but your needs might be very different. The point of this macro isn't actually the actions, but the configuration.

¹ (Yes, I know… but I wasn't the one who chose the tool.)

How to run a Keyboard Maestro macro just once…

While Keyboard Maestro does not have this functionality directly it is easy enough to “fake it” by creating a macro that will run at a specific time (say, 9:59am for a 10am meeting), and then have the last action of that macro to be to disable the macro, so it won't run again tomorrow at 9:59 a.m.

I named it “1-Time Action” instead of "Open Zoom URL at a specific time” because the next time I want to use this, I'll just search for ”1-Time Action” and edit the actions accordingly.

Oh, and I also added it to the Status Menu, in case I decided that I wanted to run it manually before the assigned time.

My action includes an "Execute Shell Script" action, but you can replace that with whatever you want.

Here's the macro (it's disabled by default, for hopefully-obvious reasons):

1-Time Action.kmmacros (3.9 KB)

Here is all it does:

I hope this serves as a good example that Keyboard Maestro macros do not have to be complex to be useful, but just something simple that you can use a number of times is still a helpful thing to have!

I think KM does have the direct builtin ability to perform a specific action at one time only. Here's how I would do it in KM:

Is it a safe guess that KM uses macOS's cron to activate this trigger? Or does KM emulate cron using its own Engine? If so, that would be direct support.

I would definitely assume that Keyboard Maestro is using its own engine, rather than relying on macOS's cron.

I have such terrible memories of trying to remember the proper syntax for cron (not that at was much better!) that I think I block out not only cron but even that Keyboard Maestro can emulate cron -- but you're right! This would be a direct way of doing it just once, and it would be a better way than mine in that you could schedule it further out into the future, whereas mine would have to be in the next 7 days.

Thanks!

What a nice thing to say, especially when it comes from one of the wizards on this site. It makes my ego feel good, thanks.

It's easy to forget a KM feature. I even saw a post a couple of days ago when the Macro God himself, Peter, admitted there were some things he forgot KM could do. I think KM has created a life on its own that has gone beyond its own creator's abilities. Didn't they call that Skynet in the movies? My coworkers always accused me of nearly creating Skynet, but I think it's self-awareness date is earlier with Peter around. Hey Peter, be on the lookout for Terminators. Carry a big gun. Or carry Linda Hamilton.