Cursor Automations

Scheduled cloud agents for daily maintenance and edition server management

Overview

Cursor Automations (available since March 5, 2026) run cloud agents on a schedule — no local launchd configuration, no XML plists, no cron jobs on your Mac.

Why automations complement launchd:

  • Run even when the Mac is sleeping or offline
  • Agent memory: learns from past failures, skips already-processed items on retry
  • Prompt-driven: adjust behaviour by editing text, not XML
  • Health-check capable: each run can verify the previous state before acting
  • Unified audit trail at cursor.com/automations

Create or edit automations at cursor.com/automations/new.

INQUA services are off-limits. Never reference or restart ports 8080, 5101, or any service under ~/inqua2026/ in any automation.


Edition Servers Inventory

All scholarly edition servers are ai-viewer instances. Start commands live in config/service-commands.yaml. None have launchd plists — they are started by the daily restart automation below.

Route Port Edition Domain Start command
/euler-opera 5103 Euler Opera Omnia euler-opera.lettre.ai ai-viewer --server --port 5103
/kepler-gw 5104 Kepler Gesammelte Werke kepler-gw.lettre.ai ai-viewer --server --port 5104
/copernicus 5105 Copernicus Studies copernicus.lettre.ai ai-viewer --server --port 5105
/waefler 5106 Waefler-Hamidi Archive waefler.lettre.ai ai-viewer --server --port 5106
/kirch 5109 Kirch Correspondence kirch.lettre.ai ai-viewer --server --port 5109
/sundials 5720 Ancient Sundials (BSDP) ancient-sundials.lettre.ai ai-viewer --server --port 5720
/karman 5725 Von Kármán Archive karman.lettre.ai no web server (CLI tool only)
/ancient-sundial 2200 Sundial Shadow Animator ancient-sundial.cooltool.io uvicorn sundial_server:app --port 2200

The enestroem collection is served through the general /viewer instance (port 5100).

Executable: /opt/homebrew/bin/ai-viewer — no conda env needed

Working directory: ~/Dropbox/202x/2026project/ai-viewer (except ancient-sundial which uses ~/Dropbox/202x/2026research/ai-sundial3d)


Automation 1: Edition Servers Daily Restart

Restarts all scholarly edition servers each morning before work hours.

Setting Value
URL cursor.com/automations/new
Trigger Scheduled — 0 5 * * * (05:00 daily)
Repository ai-platform
Tools Memories
Environment Disabled (no dependency install needed)

Prompt:

You are the Edition Servers restart agent. Each morning, restart the
following scholarly edition servers. Start commands are in:
  ~/Dropbox/202x/2026project/ai-platform/config/service-commands.yaml

For each edition below:
  a) Kill any existing process on its port:
       lsof -ti :PORT | xargs kill -9 2>/dev/null || true
  b) Start using conda run with the voicememo-py314 environment
  c) Wait 5 seconds, then verify: curl -sf http://localhost:PORT/ > /dev/null
  d) Log success or failure in memory

Editions to restart (in order):
  - euler-opera    port 5103   cwd: ~/Dropbox/202x/2026project/ai-viewer
      cmd: /opt/homebrew/bin/ai-viewer --server --port 5103
  - kepler-gw      port 5104   cwd: ~/Dropbox/202x/2026project/ai-viewer
      cmd: /opt/homebrew/bin/ai-viewer --server --port 5104
  - sundials        port 5720   cwd: ~/Dropbox/202x/2026project/ai-viewer
      cmd: /opt/homebrew/bin/ai-viewer --server --port 5720
  - ancient-sundial port 2200   cwd: ~/Dropbox/202x/2026research/ai-sundial3d
      cmd: /opt/homebrew/bin/python3 -m uvicorn sundial_server:app
           --host 0.0.0.0 --port 2200

Note: karman (port 5725) has no web server — skip it.

CRITICAL: Do NOT touch ports 8080, 5101, 5200, 5001 — those are INQUA and core services.

After all restarts, write a status report to:
  ~/Dropbox/202x/2026project/ai-platform/logs/editions_restart_YYYY-MM-DD.txt

Automation 2: PrivatKanzlei Daily Update

Runs all three PrivatKanzlei data sync jobs in coordinated sequence.

Setting Value
URL cursor.com/automations/new
Trigger Scheduled — 0 6 * * * (06:00 daily, after nightly launchd jobs finish)
Repository PrivatKanzlei (or ai-platform)
Tools Memories, MCP user-korrespondenz
Environment Disabled

Prompt:

You are the PrivatKanzlei daily update agent. Each morning, run all three
update jobs in sequence in ~/Dropbox/ggnew/PrivatKanzlei:

1. Gmail refresh:
   python3 scripts/gmail_auto_refresh.py --once
   Confirm OAuth tokens are valid.

2. Nightly sync:
   python3.11 scripts/nightly_mail_calendar_sync.py
   Syncs Gmail + Thunderbird mail, extracts calendar events via Gemini,
   pushes to Google Calendar.

3. Belege auto:
   python3 packages/korrespondenz/tools/firma_belege_auto.py
   Processes new company receipts/documents.

After each step check the exit code. If a step fails, record the error in
memory and continue. At the end write a summary (mails synced, calendar
events created, Belege processed) to:
  ~/.ai-korrespondenz/logs/daily_summary_YYYY-MM-DD.txt

Automation 3: VoiceMemo Daily Pipeline

Runs the full VoiceMemo pipeline: import → transcribe → classify → report update.

Setting Value
URL cursor.com/automations/new
Trigger Scheduled — 0 7 * * * (07:00 daily)
Repository ai-voicememo
Tools Memories
Environment Enabled (needs Python deps)

Prompt:

You are the VoiceMemo daily pipeline agent. Run the full pipeline each
morning from ~/Dropbox/202x/2026project/ai-voicememo:

1. Import:
   python scripts/import_recent_memos.py
   Scan Apple Voice Memos for new recordings, import to local DB.

2. Transcribe:
   python scripts/sync_and_process.py
   Transcribe pending memos using Gemini.

3. Classify:
   python scripts/classify_memos.py
   Classify transcripts into the correct project.

4. Report index:
   python scripts/generate_report_index.py
   quarto render docs/reports/
   Update the Quarto report site.

5. Validate:
   python scripts/validate_all_transcripts.py
   Report missing or failed transcripts in memory.

On failure, use memory to skip already-processed memos on the next run.
Write a summary to:
  ~/Dropbox/202x/2026project/ai-voicememo/logs/daily_summary_YYYY-MM-DD.txt

Setup Checklist

Before the automations run for the first time:

  1. GEMINI_API_KEY secret — add at cursor.com/dashboard → Cloud Agents → Secrets
  2. Onboard repositories — each automation requires a repository to be onboarded at cursor.com/onboard
  3. Memory initialisation — on first run, add a memory note: “First run — no prior state”
  4. Verify cron expressions — double-check scheduling at crontab.guru

Daily Schedule Overview

Time What runs Type
02:00 INQUA report update launchd
02:30 PrivatKanzlei nightly sync launchd
03:00 Korrespondenz sync launchd
04:00 Firma Belege auto launchd
05:00 Edition Servers Restart Cursor Automation
06:00 PrivatKanzlei Daily Update Cursor Automation
07:00 VoiceMemo Daily Pipeline Cursor Automation
08:00–21:00 VoiceMemo hourly sync launchd

Monitoring

View run history, logs, and memory state at cursor.com/automations.

Each automation writes a local summary log:

Automation Log path
Edition Servers Restart ~/Dropbox/202x/2026project/ai-platform/logs/editions_restart_YYYY-MM-DD.txt
PrivatKanzlei Daily Update ~/.ai-korrespondenz/logs/daily_summary_YYYY-MM-DD.txt
VoiceMemo Daily Pipeline ~/Dropbox/202x/2026project/ai-voicememo/logs/daily_summary_YYYY-MM-DD.txt

Retiring Redundant launchd Plists (Optional)

Once the Cursor Automations have run stably for two weeks, consider retiring these two PrivatKanzlei launchd plists to avoid double-running:

launchctl unload ~/Library/LaunchAgents/com.privatkanzlei.nightly-sync.plist
launchctl unload ~/Library/LaunchAgents/com.opensciencetechnology.firma-belege-auto.plist

Keep all other launchd plists (especially all INQUA services) unchanged.