{"definition_raw":"---\nid: life-manager-task-cleanup\ntitle: Life Manager Task Cleanup\nschedule: \"*/30 * * * *\"\ntimeout: 300\nretry: false\nenabled: true\nnotify_on: failure\nrun_as: shell\ncommand: |\n  cd /home/lucienne/workspace && python3 scripts/life_manager.py auto-close-emails\ntags: [life, cleanup, mc-2700]\nruntime_profile: claude_glm\n---\n\nAuto-close open Life tickets when their source Outlook email was actioned by Elmar\n(replied / forwarded / archived out of Inbox / permanently deleted). Gmail-backed\nLife tickets are currently skipped because this task queries Microsoft Graph\nemail status only.\n\nEach Outlook ticket created by life-manager-scan embeds source-aware metadata\n(`**Email Source:** Outlook`, `**Email Message ID:** `outlook:<id>``, and\n`**Provider Message ID:** `<id>``) and also preserves the legacy\n`**Outlook Message ID:** `<id>`` header for cleanup/UI compatibility. This task\nscans open Life tickets every 30 min, queries Graph for the raw provider message\nid from either header style, and closes the ticket when Elmar has clearly dealt\nwith the email \u2014 so he doesn't have to manually check off duplicate work.\n\nSource: MC-2700.\n","id":"life-manager-task-cleanup","last_run":{"duration_s":18.61316,"log_path":"/home/lucienne/workspace/logs/task-runs/life-manager-task-cleanup/413835.log","output":"{\n  \"closed\": [],\n  \"skipped\": [],\n  \"untouched_with_msg_id\": 27,\n  \"scanned\": 45\n}\n","started_at":"2026-06-13T06:00:25.788655+02:00","status":"completed"},"next_run":"2026-06-13 06:30","next_run_iso":"2026-06-13T06:30:00+02:00","runs":[{"duration_s":18.61316,"finished_at":"2026-06-13T06:00:44.405252+02:00","id":413835,"log_path":"/home/lucienne/workspace/logs/task-runs/life-manager-task-cleanup/413835.log","output":"{\n  \"closed\": [],\n  \"skipped\": [],\n  \"untouched_with_msg_id\": 27,\n  \"scanned\": 45\n}\n","started_at":"2026-06-13T06:00:25.788655+02:00","status":"completed","task_id":"life-manager-task-cleanup","task_name":"Life Manager Task Cleanup"},{"duration_s":19.670559,"finished_at":"2026-06-13T05:30:22.829499+02:00","id":413746,"log_path":"/home/lucienne/workspace/logs/task-runs/life-manager-task-cleanup/413746.log","output":"{\n  \"closed\": [],\n  \"skipped\": [],\n  \"untouched_with_msg_id\": 27,\n  \"scanned\": 45\n}\n","started_at":"2026-06-13T05:30:03.156503+02:00","status":"completed","task_id":"life-manager-task-cleanup","task_name":"Life Manager Task Cleanup"},{"duration_s":18.724414,"finished_at":"2026-06-13T05:00:54.823978+02:00","id":413666,"log_path":"/home/lucienne/workspace/logs/task-runs/life-manager-task-cleanup/413666.log","output":"{\n  \"closed\": [],\n  \"skipped\": [],\n  \"untouched_with_msg_id\": 27,\n  \"scanned\": 44\n}\n","started_at":"2026-06-13T05:00:36.097009+02:00","status":"completed","task_id":"life-manager-task-cleanup","task_name":"Life Manager Task Cleanup"},{"duration_s":18.707518,"finished_at":"2026-06-13T04:30:21.756019+02:00","id":413573,"log_path":"/home/lucienne/workspace/logs/task-runs/life-manager-task-cleanup/413573.log","output":"{\n  \"closed\": [],\n  \"skipped\": [],\n  \"untouched_with_msg_id\": 27,\n  \"scanned\": 44\n}\n","started_at":"2026-06-13T04:30:03.044379+02:00","status":"completed","task_id":"life-manager-task-cleanup","task_name":"Life Manager Task Cleanup"},{"duration_s":18.669979,"finished_at":"2026-06-13T04:04:31.982786+02:00","id":413489,"log_path":"/home/lucienne/workspace/logs/task-runs/life-manager-task-cleanup/413489.log","output":"{\n  \"closed\": [],\n  \"skipped\": [],\n  \"untouched_with_msg_id\": 27,\n  \"scanned\": 44\n}\n","started_at":"2026-06-13T04:04:13.309642+02:00","status":"completed","task_id":"life-manager-task-cleanup","task_name":"Life Manager Task Cleanup"},{"duration_s":18.94727,"finished_at":"2026-06-13T03:31:20.628878+02:00","id":413399,"log_path":"/home/lucienne/workspace/logs/task-runs/life-manager-task-cleanup/413399.log","output":"{\n  \"closed\": [],\n  \"skipped\": [],\n  \"untouched_with_msg_id\": 27,\n  \"scanned\": 44\n}\n","started_at":"2026-06-13T03:31:01.676935+02:00","status":"completed","task_id":"life-manager-task-cleanup","task_name":"Life Manager Task Cleanup"},{"duration_s":19.004394,"finished_at":"2026-06-13T03:00:33.680052+02:00","id":413308,"log_path":"/home/lucienne/workspace/logs/task-runs/life-manager-task-cleanup/413308.log","output":"{\n  \"closed\": [],\n  \"skipped\": [],\n  \"untouched_with_msg_id\": 27,\n  \"scanned\": 44\n}\n","started_at":"2026-06-13T03:00:14.672936+02:00","status":"completed","task_id":"life-manager-task-cleanup","task_name":"Life Manager Task Cleanup"},{"duration_s":18.958549,"finished_at":"2026-06-13T02:30:22.225465+02:00","id":413220,"log_path":"/home/lucienne/workspace/logs/task-runs/life-manager-task-cleanup/413220.log","output":"{\n  \"closed\": [],\n  \"skipped\": [],\n  \"untouched_with_msg_id\": 27,\n  \"scanned\": 44\n}\n","started_at":"2026-06-13T02:30:03.264337+02:00","status":"completed","task_id":"life-manager-task-cleanup","task_name":"Life Manager Task Cleanup"},{"duration_s":19.318202,"finished_at":"2026-06-13T02:02:20.209458+02:00","id":413135,"log_path":"/home/lucienne/workspace/logs/task-runs/life-manager-task-cleanup/413135.log","output":"{\n  \"closed\": [],\n  \"skipped\": [],\n  \"untouched_with_msg_id\": 27,\n  \"scanned\": 44\n}\n","started_at":"2026-06-13T02:02:00.886917+02:00","status":"completed","task_id":"life-manager-task-cleanup","task_name":"Life Manager Task Cleanup"},{"duration_s":19.133767,"finished_at":"2026-06-13T01:30:22.038599+02:00","id":413045,"log_path":"/home/lucienne/workspace/logs/task-runs/life-manager-task-cleanup/413045.log","output":"{\n  \"closed\": [],\n  \"skipped\": [],\n  \"untouched_with_msg_id\": 27,\n  \"scanned\": 44\n}\n","started_at":"2026-06-13T01:30:02.902831+02:00","status":"completed","task_id":"life-manager-task-cleanup","task_name":"Life Manager Task Cleanup"},{"duration_s":23.812822,"finished_at":"2026-06-13T01:00:36.490442+02:00","id":412958,"log_path":"/home/lucienne/workspace/logs/task-runs/life-manager-task-cleanup/412958.log","output":"{\n  \"closed\": [],\n  \"skipped\": [],\n  \"untouched_with_msg_id\": 27,\n  \"scanned\": 44\n}\n","started_at":"2026-06-13T01:00:12.674867+02:00","status":"completed","task_id":"life-manager-task-cleanup","task_name":"Life Manager Task Cleanup"},{"duration_s":18.758355,"finished_at":"2026-06-13T00:30:21.697340+02:00","id":412869,"log_path":"/home/lucienne/workspace/logs/task-runs/life-manager-task-cleanup/412869.log","output":"{\n  \"closed\": [],\n  \"skipped\": [],\n  \"untouched_with_msg_id\": 27,\n  \"scanned\": 44\n}\n","started_at":"2026-06-13T00:30:02.936288+02:00","status":"completed","task_id":"life-manager-task-cleanup","task_name":"Life Manager Task Cleanup"},{"duration_s":18.68338,"finished_at":"2026-06-13T00:00:45.977636+02:00","id":412781,"log_path":"/home/lucienne/workspace/logs/task-runs/life-manager-task-cleanup/412781.log","output":"{\n  \"closed\": [],\n  \"skipped\": [],\n  \"untouched_with_msg_id\": 27,\n  \"scanned\": 44\n}\n","started_at":"2026-06-13T00:00:27.291811+02:00","status":"completed","task_id":"life-manager-task-cleanup","task_name":"Life Manager Task Cleanup"},{"duration_s":18.848044,"finished_at":"2026-06-12T23:30:22.805005+02:00","id":412694,"log_path":"/home/lucienne/workspace/logs/task-runs/life-manager-task-cleanup/412694.log","output":"{\n  \"closed\": [],\n  \"skipped\": [],\n  \"untouched_with_msg_id\": 27,\n  \"scanned\": 44\n}\n","started_at":"2026-06-12T23:30:03.954520+02:00","status":"completed","task_id":"life-manager-task-cleanup","task_name":"Life Manager Task Cleanup"},{"duration_s":21.878986,"finished_at":"2026-06-12T23:00:35.253897+02:00","id":412607,"log_path":"/home/lucienne/workspace/logs/task-runs/life-manager-task-cleanup/412607.log","output":"{\n  \"closed\": [],\n  \"skipped\": [],\n  \"untouched_with_msg_id\": 27,\n  \"scanned\": 44\n}\n","started_at":"2026-06-12T23:00:13.370759+02:00","status":"completed","task_id":"life-manager-task-cleanup","task_name":"Life Manager Task Cleanup"},{"duration_s":19.495953,"finished_at":"2026-06-12T22:30:23.260081+02:00","id":412520,"log_path":"/home/lucienne/workspace/logs/task-runs/life-manager-task-cleanup/412520.log","output":"{\n  \"closed\": [],\n  \"skipped\": [],\n  \"untouched_with_msg_id\": 27,\n  \"scanned\": 44\n}\n","started_at":"2026-06-12T22:30:03.762488+02:00","status":"completed","task_id":"life-manager-task-cleanup","task_name":"Life Manager Task Cleanup"},{"duration_s":23.304494,"finished_at":"2026-06-12T22:00:31.620581+02:00","id":412433,"log_path":"/home/lucienne/workspace/logs/task-runs/life-manager-task-cleanup/412433.log","output":"{\n  \"closed\": [],\n  \"skipped\": [],\n  \"untouched_with_msg_id\": 27,\n  \"scanned\": 44\n}\n","started_at":"2026-06-12T22:00:08.313141+02:00","status":"completed","task_id":"life-manager-task-cleanup","task_name":"Life Manager Task Cleanup"},{"duration_s":19.638223,"finished_at":"2026-06-12T21:30:23.500944+02:00","id":412346,"log_path":"/home/lucienne/workspace/logs/task-runs/life-manager-task-cleanup/412346.log","output":"{\n  \"closed\": [],\n  \"skipped\": [],\n  \"untouched_with_msg_id\": 27,\n  \"scanned\": 44\n}\n","started_at":"2026-06-12T21:30:03.860290+02:00","status":"completed","task_id":"life-manager-task-cleanup","task_name":"Life Manager Task Cleanup"},{"duration_s":19.507248,"finished_at":"2026-06-12T21:00:30.093746+02:00","id":412260,"log_path":"/home/lucienne/workspace/logs/task-runs/life-manager-task-cleanup/412260.log","output":"{\n  \"closed\": [],\n  \"skipped\": [],\n  \"untouched_with_msg_id\": 27,\n  \"scanned\": 43\n}\n","started_at":"2026-06-12T21:00:10.584332+02:00","status":"completed","task_id":"life-manager-task-cleanup","task_name":"Life Manager Task Cleanup"},{"duration_s":19.822863,"finished_at":"2026-06-12T20:30:23.506161+02:00","id":412171,"log_path":"/home/lucienne/workspace/logs/task-runs/life-manager-task-cleanup/412171.log","output":"{\n  \"closed\": [],\n  \"skipped\": [],\n  \"untouched_with_msg_id\": 27,\n  \"scanned\": 43\n}\n","started_at":"2026-06-12T20:30:03.680002+02:00","status":"completed","task_id":"life-manager-task-cleanup","task_name":"Life Manager Task Cleanup"}],"runs_limit":20,"schedule":"*/30 * * * *","schedule_label":{"description":"Every 30 minutes","is_custom":false,"label":"Every 30 min","sort":1,"sort_time":""},"stats":{"avg_duration":16.904776481375357,"completed":349,"failed":0,"timeout":0,"total":349},"task":{"_description":"Auto-close open Life tickets when their source Outlook email was actioned by Elmar\n(replied / forwarded / archived out of Inbox / permanently deleted). Gmail-backed\nLife tickets are currently skipped because this task queries Microsoft Graph\nemail status only.\n\nEach Outlook ticket created by life-manager-scan embeds source-aware metadata\n(`**Email Source:** Outlook`, `**Email Message ID:** `outlook:<id>``, and\n`**Provider Message ID:** `<id>``) and also preserves the legacy\n`**Outlook Message ID:** `<id>`` header for cleanup/UI compatibility. This task\nscans open Life tickets every 30 min, queries Graph for the raw provider message\nid from either header style, and closes the ticket when Elmar has clearly dealt\nwith the email \u2014 so he doesn't have to manually check off duplicate work.\n\nSource: MC-2700.","_file":"life-manager-task-cleanup.md","_path":"/home/lucienne/workspace/tasks/life-manager-task-cleanup.md","command":"cd /home/lucienne/workspace && python3 scripts/life_manager.py auto-close-emails\n","enabled":true,"id":"life-manager-task-cleanup","notify_on":"failure","retry":false,"run_as":"shell","runtime_profile":"claude_glm","schedule":"*/30 * * * *","tags":["life","cleanup","mc-2700"],"timeout":300,"title":"Life Manager Task Cleanup"}}
