如果你是 iOS 和 Mac 内建的「提醒事项」用户,时间久了一定会注意到 App 中的「已完成」部分越积攒越多,然而这些任务既不能复选一次删除,App 也不提供自动清理的机制。

下面教你几个方法清除已完成的提醒事项。

iCloud

登陆到 iCloud 的 Reminders 网页应用后,每个列表的右上角都有「清理已完成事项」按钮。

iCloud
iCloud

iOS 端

在 iOS 上借助 Workflow 可以很轻松的实现清理目的:只需要 Finder Reminders WhereRemove Reminders 两个动作。Finder Reminders Where 动作设定过滤条件:「Is Complete」。

随后把 Workflow 添加到 Launch Center Pro 中,设定 Schedule 为重复每月提醒,或者将其 URL Schemes 添加到任务管理工具中。这样每个月 Launch Center Pro 就会提示一次清理 Reminders,点击通知会直接运行 Workflow。

iOS 端
iOS 端

Mac 端

感谢 Reminders.app 在除了 Standard Suite 之外提供了丰富的 Apple Script 支持,在实现上比 iOS 更灵活,相关说明已写在注释中:

set remindersOpen to application "Reminders" is running
-- 判断 Reminders 是否打开
set monthAgo to (current date) - (30 * days)
-- 清理已完成一个月以上的任务
tell application "Reminders"
set myLists to name of every list
-- 如果只希望清理特定列表的任务,将这行改为
-- set myLists to {"Computer", "Life", "Schoolwork"}
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

随后将这段脚本添加到 Keyboard Maestro 中,设定定时运行。不过相较于定时运行触发器,我更建议添加 URL 触发器后,将对应的 URL添加到任务管理软件中。

Keyboard Maestro
Keyboard Maestro

如果你没有 Keyboard Maestro,可以将脚本保存为文件,然后借助 macOS 的 launchd 实现定时运行。少数派的 这篇文章 讲解了 launchd 的使用。

Credit

Cleaning out old Reminders - All this

> 下载 少数派 iOS 客户端、关注 少数派公众号,让智能设备更好用 ⚡️