Skip to content

feat(cli): add cron subcommand for managing scheduled routines - #1017

Merged
zmanian merged 3 commits into
stagingfrom
zmanian/pr844-cron-cli
Mar 12, 2026
Merged

zmanian merged 3 commits into
stagingfrom
zmanian/pr844-cron-cli

Conversation

@zmanian

@zmanian zmanian commented Mar 12, 2026

Copy link
Copy Markdown
Collaborator

Replacement for #844 on current staging.

This rescues the cron-management CLI onto current branch state:

  • ironclaw cron list/create/edit/enable/disable/delete/history
  • --yes support for non-interactive deletion
  • --json output for machine-readable list/history
  • invalid timezone rejection
  • feature parity status updated in FEATURE_PARITY.md

Validation:

  • cargo test cli -- --nocapture

Original PR: #844

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@github-actions github-actions Bot added size: XL 500+ changed lines scope: channel/cli TUI / CLI channel scope: docs Documentation risk: low Changes to docs, tests, or low-risk modules contributor: core 20+ merged PRs and removed size: XL 500+ changed lines labels Mar 12, 2026
@zmanian
zmanian enabled auto-merge (squash) March 12, 2026 03:32
reidliu41 and others added 2 commits March 12, 2026 11:00
  Rebase onto staging branch and address collaborator review:
  - Fix .unwrap_or(None) → proper error propagation in set_enabled()
  - Add --yes/-y flag for non-interactive deletion with confirmation prompt
  - Add --json flag for machine-readable output in list and history
  - Preserve error context chain with {e:#} in run_cron_cli()

  Note: GATEWAY_USER_ID is trusted from the environment; future work may
  add authentication for multi-tenant deployments.
@zmanian
zmanian force-pushed the zmanian/pr844-cron-cli branch from 7b7d714 to 112a408 Compare March 12, 2026 18:01
@github-actions github-actions Bot added the size: XL 500+ changed lines label Mar 12, 2026
@henrypark133

Copy link
Copy Markdown
Collaborator

Do we want to have a separate cron cli or extend routines?

The system manages all routine types (cron, webhook, event, manual),
not just cron schedules. Rename the CLI subcommand to reflect this:
- `ironclaw cron` -> `ironclaw routines` (with `cron` as hidden alias)
- List shows all routines by default, add --trigger filter
- Remove cron-trigger-only validation
- Simplify require_routine helper (no trigger type check)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Comment thread FEATURE_PARITY.md
| `plugins` | ✅ | ❌ | P3 | Plugin management |
| `hooks` | ✅ | ✅ | P2 | Lifecycle hooks |
| `cron` | ✅ | ❌ | P2 | Scheduled jobs (model/thinking fields in edit) |
| `cron` | ✅ | 🚧 | P2 | list/create/edit/enable/disable/delete/history; TODO: `cron run`, model/thinking fields |

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: routines?

@henrypark133 henrypark133 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just the fmt/clippy error fixes! It looks good.

@zmanian
zmanian merged commit bcda73c into staging Mar 12, 2026
5 of 10 checks passed
@zmanian
zmanian deleted the zmanian/pr844-cron-cli branch March 12, 2026 19:47
@reidliu41

Copy link
Copy Markdown
Contributor

Part of #83

@ironclaw-ci ironclaw-ci Bot mentioned this pull request Mar 12, 2026
bkutasi pushed a commit to bkutasi/ironclaw that referenced this pull request Mar 28, 2026
…i#1017)

* feat(cli): add cron subcommand for managing scheduled routines
  Rebase onto staging branch and address collaborator review:
  - Fix .unwrap_or(None) → proper error propagation in set_enabled()
  - Add --yes/-y flag for non-interactive deletion with confirmation prompt
  - Add --json flag for machine-readable output in list and history
  - Preserve error context chain with {e:#} in run_cron_cli()

  Note: GATEWAY_USER_ID is trusted from the environment; future work may
  add authentication for multi-tenant deployments.

* fix(cli): reject invalid cron timezones

* refactor(cli): rename cron subcommand to routines

The system manages all routine types (cron, webhook, event, manual),
not just cron schedules. Rename the CLI subcommand to reflect this:
- `ironclaw cron` -> `ironclaw routines` (with `cron` as hidden alias)
- List shows all routines by default, add --trigger filter
- Remove cron-trigger-only validation
- Simplify require_routine helper (no trigger type check)

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

---------

Co-authored-by: reidliu41 <reid201711@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
drchirag1991 pushed a commit to drchirag1991/ironclaw that referenced this pull request Apr 8, 2026
…i#1017)

* feat(cli): add cron subcommand for managing scheduled routines
  Rebase onto staging branch and address collaborator review:
  - Fix .unwrap_or(None) → proper error propagation in set_enabled()
  - Add --yes/-y flag for non-interactive deletion with confirmation prompt
  - Add --json flag for machine-readable output in list and history
  - Preserve error context chain with {e:#} in run_cron_cli()

  Note: GATEWAY_USER_ID is trusted from the environment; future work may
  add authentication for multi-tenant deployments.

* fix(cli): reject invalid cron timezones

* refactor(cli): rename cron subcommand to routines

The system manages all routine types (cron, webhook, event, manual),
not just cron schedules. Rename the CLI subcommand to reflect this:
- `ironclaw cron` -> `ironclaw routines` (with `cron` as hidden alias)
- List shows all routines by default, add --trigger filter
- Remove cron-trigger-only validation
- Simplify require_routine helper (no trigger type check)

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

---------

Co-authored-by: reidliu41 <reid201711@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor: core 20+ merged PRs risk: low Changes to docs, tests, or low-risk modules scope: channel/cli TUI / CLI channel scope: docs Documentation size: XL 500+ changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants