⚙️ 自动化 📖 官方

通知提醒系统

为系统事件、文件变化和定时提醒设置自动通知

★☆☆ 初级 15 min 2025年1月13日
📋

使用场景

在日常工作中,及时获知重要事件而无需持续监控非常重要。Cowork 可以帮助你设置通知系统,在满足特定条件时自动发出提醒。

💬

提示词

I want to set up automated notifications on my Mac. Please create:

1. File monitoring:
   - Alert when any file is added to ~/Downloads
   - Alert when ~/Documents/Important changes

2. System alerts:
   - Notify if disk usage exceeds 80%
   - Alert when a specific process stops

3. Scheduled reminders:
   - Daily standup reminder at 9:45 AM
   - Weekly backup reminder on Sundays

Create the scripts and launchd configurations. Save to ~/Scripts/notifications/

预期结果

Claude 会创建: - 文件监控脚本(使用 fswatch) - 系统检查脚本(磁盘空间等) - 定时提醒脚本(使用原生对话框) - launchd 配置文件(用于定时任务)

💡

使用技巧

  • 确保脚本文件有执行权限(chmod +x)
  • 对于重要的远程提醒,可以集成 Slack 或企业微信 webhook
  • 可以在脚本中添加去重逻辑,避免短时间内重复通知