retmates.blogg.se

How to delete all completed reminders on mac
How to delete all completed reminders on mac








There used to be a simple way to run scripts periodically using Calendar, but Apple has either deleted that function or hidden it well. Frankly, it’s no big deal if the script doesn’t run for a few days. I’m not sure how Keyboard Maestro handles macros that got triggered when it wasn’t on, so you may want to change it to a time that you’re likely to be at your computer. If you own Keyboard Maestro, you can avoid launchd by creating a macro with a timed trigger to run the script. Save it to your ~/Library/LaunchAgents folder and follow Nathan’s instructions to use launchctl to load it.

how to delete all completed reminders on mac

Change lines 16 and 18 to set the hour and minute you prefer. Lines 14–19 set the script to run every morning at 6:06. You’ll need to change the path in Line 10 to wherever you have Purge Old Reminders stored. Lines 8–11 run the AppleScript via the osascript command. Either way, you’ll end up with a plist file that looks something like this: xml:ġ0: /Users/drdrang/Dropbox/bin/Purge Old Reminders.scpt Or you can read Nathan Grigg’s excellent launchd tutorial, which you should probably do even if you do buy LaunchControl. If you want to go that way, I’d suggest you get a copy of LaunchControl, a $10 app that makes the creation and scheduling of launchd services relatively painless. The standard way to run scripts periodically in macOS is to use the launchd system. You can, of course, just run this script by hand whenever you get the hankering to purge your old completed reminders, but the cool thing is to set up a system to run it periodically. Where the braces enclose a comma-separated list of the names of the lists you want to purge with the names in double quotes. If you don’t want all your lists purged, change Line 4 to something like set myLists to If you want to change how old a completed reminder has to be before it gets purged, change the (30 * days) part in Line 1 to whatever you prefer. Lines 5–9 then loop through all your lists, deleting all the reminders with a completion date that falls before monthago. Line 4 gets the names of all your Reminders lists and puts them in the variable myLists. Line 1 determines the date 30 days ago and saves it in the variable monthago. Let’s look at the script, which I’ve named “Purge Old Reminders.” applescript:ġ: set monthago to (current date) - (30 * days)ħ: delete (every reminder whose completion date is less than monthago) But you may want to think about backups before implementing this.Īlso, are you sure you want to delete all your old completed reminders? Maybe some of them would be good to have around to prove-to yourself, at least-what you did and when you did it.Įnd of caveats.

how to delete all completed reminders on mac

That worked, so I think the 30-day revision should also work.

how to delete all completed reminders on mac how to delete all completed reminders on mac

I made up a bunch of fake reminders in different lists, and wrote the script initially to delete all completed tasks that were more than 5 minutes old. And it was.įirst, though, I should mention that there’s been very little testing of this script. Given that Reminders has a fairly decent AppleScript dictionary, I figured it’d be easy to write a script that would do what Dan wanted. It would be great if… Apple provided an option to have those completed tasks automatically deleted after a certain amount of time-30 days would work great for me-and even better if it allowed you to choose the interval.

#How to delete all completed reminders on mac manual

Next post Previous post Cleaning out old RemindersĪs I read my RSS feed during lunch today, I came across this post by Dan Moren at Six Colors, in which he complains, rightly, that Apple’s Reminders apps-Mac and iOS-have no automated or manual way to clean out old completed tasks.








How to delete all completed reminders on mac