Files
cc-connect/cmd
术士木星andClaude Opus 4.6 ab87b68b0b feat(cron): add cron edit command to modify job fields
* feat(cron): add `cron edit` command to modify job fields

Add new CLI command `cc-connect cron edit <id> <field> <value>` that
modifies individual fields of a scheduled task.

Features:
- Supports all editable fields: project, session_key, cron_expr, prompt,
  exec, work_dir, description, enabled, silent, mute, session_mode, timeout_mins
- Type validation: bool fields (enabled, mute) and int fields (timeout_mins)
- Read-only fields protected: id, created_at cannot be modified
- Cron expression validation before applying
- Automatic rescheduling when cron_expr or enabled changes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(cron): add fallback reflection for string fields + comprehensive help

- Add reflection-based fallback for unknown string fields in updateJobField
- Add printCronEditUsage() with full field list, types, and examples
- Add --help/-h flag support to runCronEdit
- Update error messages to reference --help

The reflection fallback allows editing new string fields without code changes,
while type validation for known fields (bool, int) is preserved.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(cron): protect last_run and last_error from editing

Add last_run and last_error to read-only fields list.
These are system-maintained fields that should not be manually edited.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 08:03:21 +08:00
..