2 Commits
Author SHA1 Message Date
Juan Denis 9b813b4166 fix(cron): match job lines exactly 2026-08-27 20:30:17 -04:00
Juan DenisandClaude Fable 5 719d29c8a5 fix(cron): join crontab lines back to their metadata (#117)
Creating a named cron job on Linux wrote the display name into the
"# ServerKit Job:" marker comment and list_jobs re-parsed the crontab
under synthetic cron_<index> ids, so the metadata store (name,
description, enabled, application_id) never joined back: the job listed
as unnamed and every mutation route answered "Job not found" — the only
way out was crontab -e.

- add_job now always writes the job_id into the marker comment (the
  name rides along, whitespace-collapsed so it cannot inject lines)
- list_jobs recovers the id from the marker, falls back to a
  schedule+command match for pre-fix lines whose marker holds the name,
  and backfills metadata-only jobs so disabled (commented-out) jobs
  stay visible and manageable
- remove_job/toggle_job also match shim-wrapped (tracked) lines, and
  remove drops a legacy marker comment left above the deleted line

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-27 03:42:01 -04:00