Skip to content

fix(cron): preserve pause when a running job finishes - #996

Open
lewismosciski wants to merge 1 commit into
modelscope:mainfrom
lewismosciski:fix/cron-preserve-paused-state
Open

lewismosciski wants to merge 1 commit into
modelscope:mainfrom
lewismosciski:fix/cron-preserve-paused-state

Conversation

@lewismosciski

Copy link
Copy Markdown

Change Summary

Pausing a running recurring job currently lasts only until that run finishes: record_result() changes its status back to scheduled. Preserve paused while recording the result and advancing the next run. One-shot jobs and exhausted repeat limits still complete normally.

Added regressions for successful/failed runs, terminal states, and a background run paused through a separate manager sharing the jobs file.

Validation: python -m pytest tests/cron -q (103 passed); pre-commit passed for all three changed files. Full-repo pre-commit still reports existing failures on unchanged main, including ms_agent/config/skills_manager.py:61 and ms_agent/permission/shell_validator.py:91.

Related issue number

None; found while tracing cron state transitions.

Checklist

  • The pull request title is a good summary of the changes - it will be used in the changelog
  • Unit tests for the changes exist
  • Run pre-commit install and pre-commit run --all-files before git commit, and passed lint check. Ran both; full-repo failures noted above.
  • Documentation reflects the changes where applicable (no command or configuration changes)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant