Skip to content

Instantly share code, notes, and snippets.

@sergdenisov
Last active December 24, 2019 14:45
Show Gist options
  • Save sergdenisov/783e95a4ea2d0b106c7ee034e17aa3e4 to your computer and use it in GitHub Desktop.
Save sergdenisov/783e95a4ea2d0b106c7ee034e17aa3e4 to your computer and use it in GitHub Desktop.
An automatically deleting of all completed Apple reminders on macOS every hour
  1. Copy the deleteCompletedReminders.scpt file to your directory (for example, xxx).
  2. In the deleteCompletedReminders.plist file change the PATH_TO_YOUR_SCRIPT constant to the path to your xxx directory.
  3. Copy the deleteCompletedReminders.plist file to the /Library/LaunchAgents/ directory.
  4. Restart your computer.
  5. The deleting script will be executed on every login (may ask for some permissions for the first time) and every 24 hours.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Disabled</key>
<false/>
<key>Label</key>
<string>deleteCompletedReminders</string>
<key>Program</key>
<string>/usr/bin/osascript</string>
<key>ProgramArguments</key>
<array>
<string>osascript</string>
<string>PATH_TO_YOUR_SCRIPT/deleteCompletedReminders.scpt</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>StartInterval</key>
<integer>3600</integer>
</dict>
</plist>
tell application "Reminders" to delete (reminders whose completed is true)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment