Conversation
added 2 commits
April 30, 2026 00:58
…tion Adds a new CLI command that runs the scheduler in a loop every 60 seconds for a configurable duration (default: 60 minutes). Intended for local development and testing without OS-level cron setup. Usage: php webfiori scheduler:daemon php webfiori scheduler:daemon --max-minutes=5 Fixes #300
Tests cover: - No tasks registered (early exit) - Invalid --max-minutes values (zero and negative) - Wrong scheduler password - Command name and description metadata
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #311 +/- ##
=========================================
Coverage 74.88% 74.88%
Complexity 2976 2976
=========================================
Files 97 97
Lines 9512 9513 +1
=========================================
+ Hits 7123 7124 +1
Misses 2389 2389
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Add a
scheduler:daemonCLI command that runs the scheduler in a loop for a configurable duration, intended for local development and testing.Motivation
Developers need a way to test scheduled tasks locally without setting up OS-level cron.
scheduler:runexecutes once and exits. This command loops every 60 seconds and self-terminates after the specified duration. Fixes #300.Changes
SchedulerDaemonCommandclass with--max-minutesargument (default: 60)App.phpHelpCommandTestexpected output to include the new commandHow to Test / Verify
The command will run the scheduler check every 60 seconds and exit after 1 minute.
Breaking Changes and Migration Steps
None
Checklist
Related issues
Closes #300