{"definition_raw":"---\nid: cleanup-wa-media\ntitle: Prune WhatsApp downloaded media older than 30 days\nschedule: \"45 3 * * *\"\ntimeout: 120\nretry: false\nenabled: true\nnotify_on: failure\nrun_as: shell\ncommand: \"find /home/lucienne/workspace/data/whatsapp/media -type f -mtime +30 -print -delete 2>/dev/null | wc -l; find /home/lucienne/workspace/data/whatsapp/media -mindepth 1 -type d -empty -delete 2>/dev/null\"\ntags: [maintenance, whatsapp, housekeeping]\nruntime_profile: direct_shell\n---\n\n**OVERRIDES runtime profile:** uses `direct_shell` because this is a\ndeterministic filesystem cleanup command with no Claude/Codex or LLM API\ninvocation.\n\nDaily 03:45 UTC (05:45 SAST). Deletes image files older than 30 days from\nthe WhatsApp monitor's media cache. These are downloaded for the image-OCR\npipeline (Cayla's hockey fixtures etc.) and need a hard TTL to prevent\nunbounded disk growth on a 40 GB Hetzner box.\n\nThe DB row's `media_path` will dangle for deleted files; that's intentional \u2014\ndeletion is the signal that the image is past relevance and shouldn't be\nre-OCR'd. The OCR state-file dedup keeps record_ids forever (capped at 2000\nentries) so already-processed records are still skipped.\n","id":"cleanup-wa-media","last_run":{"duration_s":0.036937,"log_path":"/home/lucienne/workspace/logs/task-runs/cleanup-wa-media/413439.log","output":"0\n","started_at":"2026-06-13T03:45:00.543071+02:00","status":"completed"},"next_run":"2026-06-14 03:45","next_run_iso":"2026-06-14T03:45:00+02:00","runs":[{"duration_s":0.036937,"finished_at":"2026-06-13T03:45:00.583228+02:00","id":413439,"log_path":"/home/lucienne/workspace/logs/task-runs/cleanup-wa-media/413439.log","output":"0\n","started_at":"2026-06-13T03:45:00.543071+02:00","status":"completed","task_id":"cleanup-wa-media","task_name":"Prune WhatsApp downloaded media older than 30 days"},{"duration_s":0.048646,"finished_at":"2026-06-12T03:45:00.729139+02:00","id":409273,"log_path":"/home/lucienne/workspace/logs/task-runs/cleanup-wa-media/409273.log","output":"0\n","started_at":"2026-06-12T03:45:00.573294+02:00","status":"completed","task_id":"cleanup-wa-media","task_name":"Prune WhatsApp downloaded media older than 30 days"},{"duration_s":0.150205,"finished_at":"2026-06-11T03:45:00.737940+02:00","id":404913,"log_path":"/home/lucienne/workspace/logs/task-runs/cleanup-wa-media/404913.log","output":"0\n","started_at":"2026-06-11T03:45:00.582298+02:00","status":"completed","task_id":"cleanup-wa-media","task_name":"Prune WhatsApp downloaded media older than 30 days"},{"duration_s":0.148022,"finished_at":"2026-06-10T03:45:00.718749+02:00","id":400637,"log_path":"/home/lucienne/workspace/logs/task-runs/cleanup-wa-media/400637.log","output":"0\n","started_at":"2026-06-10T03:45:00.551491+02:00","status":"completed","task_id":"cleanup-wa-media","task_name":"Prune WhatsApp downloaded media older than 30 days"},{"duration_s":0.168687,"finished_at":"2026-06-09T03:45:00.550166+02:00","id":396401,"log_path":"/home/lucienne/workspace/logs/task-runs/cleanup-wa-media/396401.log","output":"0\n","started_at":"2026-06-09T03:45:00.378114+02:00","status":"completed","task_id":"cleanup-wa-media","task_name":"Prune WhatsApp downloaded media older than 30 days"},{"duration_s":0.147773,"finished_at":"2026-06-08T03:45:00.753584+02:00","id":392309,"log_path":"/home/lucienne/workspace/logs/task-runs/cleanup-wa-media/392309.log","output":"0\n","started_at":"2026-06-08T03:45:00.589448+02:00","status":"completed","task_id":"cleanup-wa-media","task_name":"Prune WhatsApp downloaded media older than 30 days"},{"duration_s":0.042131,"finished_at":"2026-06-07T03:45:00.547961+02:00","id":387887,"log_path":"/home/lucienne/workspace/logs/task-runs/cleanup-wa-media/387887.log","output":"0\n","started_at":"2026-06-07T03:45:00.399950+02:00","status":"completed","task_id":"cleanup-wa-media","task_name":"Prune WhatsApp downloaded media older than 30 days"},{"duration_s":0.045878,"finished_at":"2026-06-06T03:45:00.762823+02:00","id":383167,"log_path":"/home/lucienne/workspace/logs/task-runs/cleanup-wa-media/383167.log","output":"0\n","started_at":"2026-06-06T03:45:00.609193+02:00","status":"completed","task_id":"cleanup-wa-media","task_name":"Prune WhatsApp downloaded media older than 30 days"}],"runs_limit":20,"schedule":"45 3 * * *","schedule_label":{"description":"Daily at 03:45","is_custom":false,"label":"Daily","sort":4,"sort_time":"03:45"},"stats":{"avg_duration":0.098534875,"completed":8,"failed":0,"timeout":0,"total":8},"task":{"_description":"**OVERRIDES runtime profile:** uses `direct_shell` because this is a\ndeterministic filesystem cleanup command with no Claude/Codex or LLM API\ninvocation.\n\nDaily 03:45 UTC (05:45 SAST). Deletes image files older than 30 days from\nthe WhatsApp monitor's media cache. These are downloaded for the image-OCR\npipeline (Cayla's hockey fixtures etc.) and need a hard TTL to prevent\nunbounded disk growth on a 40 GB Hetzner box.\n\nThe DB row's `media_path` will dangle for deleted files; that's intentional \u2014\ndeletion is the signal that the image is past relevance and shouldn't be\nre-OCR'd. The OCR state-file dedup keeps record_ids forever (capped at 2000\nentries) so already-processed records are still skipped.","_file":"cleanup-wa-media.md","_path":"/home/lucienne/workspace/tasks/cleanup-wa-media.md","command":"find /home/lucienne/workspace/data/whatsapp/media -type f -mtime +30 -print -delete 2>/dev/null | wc -l; find /home/lucienne/workspace/data/whatsapp/media -mindepth 1 -type d -empty -delete 2>/dev/null","enabled":true,"id":"cleanup-wa-media","notify_on":"failure","retry":false,"run_as":"shell","runtime_profile":"direct_shell","schedule":"45 3 * * *","tags":["maintenance","whatsapp","housekeeping"],"timeout":120,"title":"Prune WhatsApp downloaded media older than 30 days"}}
