{"definition_raw":"---\nid: cloud-radio-retention\ntitle: Cloud radio output retention\nschedule: \"30 3 * * *\"\ntimeout: 300\nretry: false\nenabled: true\nnotify_on: failure\nnotify_to: tasks\nrun_as: shell\ncommand: \"cd /home/lucienne/workspace && python3 /home/lucienne/workspace/scripts/cloud_radio_retention.py --apply\"\ntags: [maintenance, radio, pka, retention, cloud-outputs]\nruntime_profile: direct_shell\n---\n\nDaily retention for the PKA cloud outputs radio tree.\n\nDeletes radio `.mp3` episodes older than 90 days plus same-date\nmanifest/seed/summary sidecars. The script resolves the live radio directory via\n`python3 /home/lucienne/workspace/PKA/pka_paths.py outputs-dir radio` and only\noperates directly inside that resolved `radio/` directory.\n\nSafety:\n\n- default script mode is dry-run for manual inspection;\n  this scheduled task passes `--apply` for live deletion\n- `board/`, `study/`, and `reports/` are never traversed or pruned\n- at least the newest 10 radio episodes are retained regardless of age\n- filename dates (`YYYY-MM-DD`) are preferred; mtime is the fallback for undated\n  `.mp3` files\n\nManual dry-run:\n\n```bash\npython3 /home/lucienne/workspace/scripts/cloud_radio_retention.py --dry-run\n```\n","id":"cloud-radio-retention","last_run":{"duration_s":0.556358,"log_path":"/home/lucienne/workspace/logs/task-runs/cloud-radio-retention/413393.log","output":"apply: no stale radio files found under /home/lucienne/gdrive/PKA-Outputs/radio\n{\n  \"deleted\": [],\n  \"deleted_count\": 0,\n  \"errors\": [],\n  \"keep_recent\": 10,\n  \"mode\": \"apply\",\n  \"planned_count\": 0,\n  \"planned_deletes\": [],\n  \"radio_dir\": \"/home/lucienne/gdrive/PKA-Outputs/radio\",\n  \"retention_days\": 90\n}\n","started_at":"2026-06-13T03:30:39.819607+02:00","status":"completed"},"next_run":"2026-06-14 03:30","next_run_iso":"2026-06-14T03:30:00+02:00","runs":[{"duration_s":0.556358,"finished_at":"2026-06-13T03:30:40.378750+02:00","id":413393,"log_path":"/home/lucienne/workspace/logs/task-runs/cloud-radio-retention/413393.log","output":"apply: no stale radio files found under /home/lucienne/gdrive/PKA-Outputs/radio\n{\n  \"deleted\": [],\n  \"deleted_count\": 0,\n  \"errors\": [],\n  \"keep_recent\": 10,\n  \"mode\": \"apply\",\n  \"planned_count\": 0,\n  \"planned_deletes\": [],\n  \"radio_dir\": \"/home/lucienne/gdrive/PKA-Outputs/radio\",\n  \"retention_days\": 90\n}\n","started_at":"2026-06-13T03:30:39.819607+02:00","status":"completed","task_id":"cloud-radio-retention","task_name":"Cloud radio output retention"},{"duration_s":3.454171,"finished_at":"2026-06-12T03:30:42.180029+02:00","id":409227,"log_path":"/home/lucienne/workspace/logs/task-runs/cloud-radio-retention/409227.log","output":"apply: no stale radio files found under /home/lucienne/gdrive/PKA-Outputs/radio\n{\n  \"deleted\": [],\n  \"deleted_count\": 0,\n  \"errors\": [],\n  \"keep_recent\": 10,\n  \"mode\": \"apply\",\n  \"planned_count\": 0,\n  \"planned_deletes\": [],\n  \"radio_dir\": \"/home/lucienne/gdrive/PKA-Outputs/radio\",\n  \"retention_days\": 90\n}\n","started_at":"2026-06-12T03:30:38.723183+02:00","status":"completed","task_id":"cloud-radio-retention","task_name":"Cloud radio output retention"},{"duration_s":0.249407,"finished_at":"2026-06-11T03:30:39.619426+02:00","id":404864,"log_path":"/home/lucienne/workspace/logs/task-runs/cloud-radio-retention/404864.log","output":"apply: no stale radio files found under /home/lucienne/gdrive/PKA-Outputs/radio\n{\n  \"deleted\": [],\n  \"deleted_count\": 0,\n  \"errors\": [],\n  \"keep_recent\": 10,\n  \"mode\": \"apply\",\n  \"planned_count\": 0,\n  \"planned_deletes\": [],\n  \"radio_dir\": \"/home/lucienne/gdrive/PKA-Outputs/radio\",\n  \"retention_days\": 90\n}\n","started_at":"2026-06-11T03:30:39.366924+02:00","status":"completed","task_id":"cloud-radio-retention","task_name":"Cloud radio output retention"},{"duration_s":0.246601,"finished_at":"2026-06-10T03:30:39.647609+02:00","id":400588,"log_path":"/home/lucienne/workspace/logs/task-runs/cloud-radio-retention/400588.log","output":"apply: no stale radio files found under /home/lucienne/gdrive/PKA-Outputs/radio\n{\n  \"deleted\": [],\n  \"deleted_count\": 0,\n  \"errors\": [],\n  \"keep_recent\": 10,\n  \"mode\": \"apply\",\n  \"planned_count\": 0,\n  \"planned_deletes\": [],\n  \"radio_dir\": \"/home/lucienne/gdrive/PKA-Outputs/radio\",\n  \"retention_days\": 90\n}\n","started_at":"2026-06-10T03:30:39.398295+02:00","status":"completed","task_id":"cloud-radio-retention","task_name":"Cloud radio output retention"},{"duration_s":0.17975,"finished_at":"2026-06-09T17:32:00.746354+02:00","id":398800,"log_path":"/home/lucienne/workspace/logs/task-runs/cloud-radio-retention/398800.log","output":"apply: no stale radio files found under /home/lucienne/gdrive/PKA-Outputs/radio\n{\n  \"deleted\": [],\n  \"deleted_count\": 0,\n  \"errors\": [],\n  \"keep_recent\": 10,\n  \"mode\": \"apply\",\n  \"planned_count\": 0,\n  \"planned_deletes\": [],\n  \"radio_dir\": \"/home/lucienne/gdrive/PKA-Outputs/radio\",\n  \"retention_days\": 90\n}\n","started_at":"2026-06-09T17:32:00.562392+02:00","status":"completed","task_id":"cloud-radio-retention","task_name":"Cloud radio output retention"}],"runs_limit":20,"schedule":"30 3 * * *","schedule_label":{"description":"Daily at 03:30","is_custom":false,"label":"Daily","sort":4,"sort_time":"03:30"},"stats":{"avg_duration":0.9372574,"completed":5,"failed":0,"timeout":0,"total":5},"task":{"_description":"Daily retention for the PKA cloud outputs radio tree.\n\nDeletes radio `.mp3` episodes older than 90 days plus same-date\nmanifest/seed/summary sidecars. The script resolves the live radio directory via\n`python3 /home/lucienne/workspace/PKA/pka_paths.py outputs-dir radio` and only\noperates directly inside that resolved `radio/` directory.\n\nSafety:\n\n- default script mode is dry-run for manual inspection;\n  this scheduled task passes `--apply` for live deletion\n- `board/`, `study/`, and `reports/` are never traversed or pruned\n- at least the newest 10 radio episodes are retained regardless of age\n- filename dates (`YYYY-MM-DD`) are preferred; mtime is the fallback for undated\n  `.mp3` files\n\nManual dry-run:\n\n```bash\npython3 /home/lucienne/workspace/scripts/cloud_radio_retention.py --dry-run\n```","_file":"cloud-radio-retention.md","_path":"/home/lucienne/workspace/tasks/cloud-radio-retention.md","command":"cd /home/lucienne/workspace && python3 /home/lucienne/workspace/scripts/cloud_radio_retention.py --apply","enabled":true,"id":"cloud-radio-retention","notify_on":"failure","notify_to":"tasks","retry":false,"run_as":"shell","runtime_profile":"direct_shell","schedule":"30 3 * * *","tags":["maintenance","radio","pka","retention","cloud-outputs"],"timeout":300,"title":"Cloud radio output retention"}}
