Skip to content

Instantly share code, notes, and snippets.

@squatto
Forked from drdrang/Purge Old Reminders.scpt
Created August 20, 2018 03:19
Show Gist options
  • Save squatto/1ca572473155130e33ff54d9e366bbb2 to your computer and use it in GitHub Desktop.
Save squatto/1ca572473155130e33ff54d9e366bbb2 to your computer and use it in GitHub Desktop.
AppleScript to delete all reminders more than 30 days old.
set remindersOpen to application "Reminders" is running
set monthAgo to (current date) - (30 * days)
tell application "Reminders"
set myLists to name of every list
repeat with thisList in myLists
tell list thisList
delete (every reminder whose completion date is less than monthAgo)
end tell
end repeat
if not remindersOpen then quit
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment