Repository navigation
Replies: 1 comment
|
I think a dedicated schedule:status command would be the clearest API, especially for deployment and maintenance workflows. One thing I’d consider is making the output machine-readable as well. A human-friendly message like: Scheduler is paused. is useful interactively, but deployment scripts would benefit from something deterministic, for example: php artisan schedule:status --quiet returning an appropriate exit code, or optionally: php artisan schedule:status --json with a simple state such as: {"paused": true} That would make it possible to safely use the scheduler state in CI/CD or maintenance scripts without having to parse console output. I’d also lean toward keeping the status check separate from schedule:list: schedule:list describes what is scheduled, while schedule:status describes the current runtime state. That separation makes the intent of each command much clearer. |
Uh oh!
There was an error while loading. Please reload this page.
Laravel provides
schedule:pauseandschedule:continue, but there does not seem to be a built-in way to check the current pause state.It would be useful to expose this state through Artisan, especially for deployment scripts and operational checks.
For example, a new command could be added:
which could output something like:
or:
Alternatively, the current scheduler state could be shown at the end of:
For example:
I think either approach would make
schedule:pausesafer and easier to use in automated deployment and maintenance workflows.Personally, I think a dedicated
schedule:statuscommand would be the clearest option, but exposing the state throughschedule:listwould also solve the problem.All reactions