Skip to content

[12.x] add 'dry-run' option for schedule:run #56532

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

Conversation

KIKOmanasijev
Copy link
Contributor

Add --dry-run Option to schedule:run Command

Description

This pull request introduces a --dry-run option to the php artisan schedule:run command, allowing developers to preview scheduled tasks that would run without executing them. This enhances the developer experience by providing a safe way to test and verify scheduled tasks.

Example

 php artisan schedule:run --dry-run                                                              

INFO  2025-08-03 21:47:17 Skipping ['example command'], because the scheduler is started with the dry-run option.  
INFO  2025-08-03 21:47:22 Skipping ['example command'], because the scheduler is started with the dry-run option.  
INFO  2025-08-03 21:47:27 Skipping ['example command'], because the scheduler is started with the dry-run option.  

Co-authored-by: Wes Hooper <[email protected]>
@taylorotwell
Copy link
Member

You can use schedule:list to see if something is due "now".

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.

3 participants