-
Notifications
You must be signed in to change notification settings - Fork 0
feat: cronjobs #147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: cronjobs #147
Conversation
- Implement deepwork schedule add/remove/list commands - Support systemd timers on Linux - Support launchd agents on macOS - Allow scheduling any command with customizable intervals Co-authored-by: ncrmro <8276365+ncrmro@users.noreply.github.com>
- Add comprehensive unit tests for schedule functionality - Document schedule commands in README - All tests passing (488 unit tests) Co-authored-by: ncrmro <8276365+ncrmro@users.noreply.github.com>
- Add 6 integration tests for schedule CLI - All tests passing (631 tests total) - Feature complete and ready for review Co-authored-by: ncrmro <8276365+ncrmro@users.noreply.github.com>
- Replace bare Exception catches with specific exception types - Add better error messages for cleanup failures - Addresses code review feedback Co-authored-by: ncrmro <8276365+ncrmro@users.noreply.github.com>
- Remove redundant pass statements - Add validation for empty command - Add test for empty command validation - All 632 tests passing Co-authored-by: ncrmro <8276365+ncrmro@users.noreply.github.com>
- Add task name validation (alphanumeric, hyphens, underscores only) - Use shlex for proper command parsing with quoted arguments - Add XML escaping for launchd plist arguments - Use shell escaping for systemd commands - Add explicit error for invalid intervals - Add 7 new tests for validation and security features - All 639 tests passing Co-authored-by: ncrmro <8276365+ncrmro@users.noreply.github.com>
- Add monthly interval (30 days) to launchd interval map - Ensures consistency with systemd monthly interval support - All 639 tests passing Co-authored-by: ncrmro <8276365+ncrmro@users.noreply.github.com>
- Remove CalledProcessError from exception handlers (not raised with check=False) - Keep FileNotFoundError and OSError for actual failure cases - Add clarifying comments about error handling - All 639 tests passing Co-authored-by: ncrmro <8276365+ncrmro@users.noreply.github.com>
Extract platform-specific scheduling logic into a runner registry pattern (matching AgentAdapter), making it straightforward to add future runners like GitHub Actions or Kubernetes jobs. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
I have read the CLA Document and I hereby sign the CLA 1 out of 2 committers have signed the DCO. |
Adds
deepwork schedulecommand to create periodic tasks using native OS schedulers (systemd timers on Linux, launchd agents on macOS).Implementation
CLI Commands
deepwork schedule add <task-name> <command> [--interval <interval>]- Creates scheduled taskdeepwork schedule remove <task-name>- Removes scheduled taskdeepwork schedule list- Lists active scheduled tasksPlatform Support
~/.config/systemd/user/~/Library/LaunchAgents/.deepwork/logs/<task-name>.{log,err}Security
^[a-zA-Z0-9_-]+$shlex.split()to handle quoted arguments correctlyExample
Supported Intervals
hourly,daily,weekly,monthly, or integer seconds (launchd) / systemd calendar expressionsOriginal prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.