Skip to content

Conversation

@charoyan88
Copy link
Collaborator

Closes #291

@codecov
Copy link

codecov bot commented Jan 15, 2026

Codecov Report

❌ Patch coverage is 92.44332% with 30 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.65%. Comparing base (195c154) to head (8365d46).
⚠️ Report is 39 commits behind head on master.

Files with missing lines Patch % Lines
src/Libraries/Cron/CronLock.php 82.05% 21 Missing ⚠️
src/Console/Commands/CronRunCommand.php 90.00% 4 Missing ⚠️
src/Libraries/Cron/CronManager.php 94.28% 4 Missing ⚠️
src/Libraries/Cron/Helpers/cron.php 92.85% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #408      +/-   ##
============================================
- Coverage     80.72%   80.65%   -0.07%     
- Complexity     2465     2641     +176     
============================================
  Files           229      237       +8     
  Lines          6541     7020     +479     
============================================
+ Hits           5280     5662     +382     
- Misses         1261     1358      +97     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@armanist armanist requested review from a team, grigoryanmartin20 and live-soft January 15, 2026 09:32
Copy link
Member

@armanist armanist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, this is a solid and well-thought-out feature 👍

The cron runner architecture, task loading model, and execution flow look clean and consistent with Quantum’s design principles. Supporting multiple task formats (array, object, helper, fluent schedule()) is especially nice, and the implementation stays readable without introducing unnecessary complexity.

I’ve left several inline comments that need to be addressed before merge — mostly around clarity, edge cases, and a few behavioral details — so I’m marking this review as Changes required for now.

As a nice-to-have (not a blocker): it would be great in the future to support a command() API on the fluent schedule() builder (similar to Laravel), which would compile into a callback that spawns a console command in a separate process. This would make running Quantum console commands via cron more ergonomic, while keeping the current execution model intact.

Once the requested changes are addressed, this should be in good shape to move forward.

@armanist armanist self-requested a review January 19, 2026 11:56
Copy link
Member

@armanist armanist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of the issues are solved, only few issues was pointed by scrutinizer here that will need to be addressed (mostly related to suppressing errors/warnings via @.):
https://scrutinizer-ci.com/g/softberg/quantum-php-core/inspections/cfd49738-baf5-4a91-8b8f-a7acfb5c5cec/issues/files/src/Libraries/Cron/CronLock.php?status=new&orderField=path&order=asc&honorSelectedPaths=0

@charoyan88 charoyan88 requested a review from armanist January 19, 2026 14:09
@armanist armanist merged commit f84b1b8 into softberg:master Jan 19, 2026
5 of 6 checks passed
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.

Add native cron task runner command to Quantum CLI (qt cron:run)

4 participants