Native Cron Job Scheduling Support in PHP Core #15
gavriel-adi
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
As PHP continues evolving towards more modern and asynchronous capabilities, I believe it’s time to consider native support fo
r scheduled background tasks — essentially a built-in cron job system.
Currently, developers rely on external cron or task schedulers at the OS level or tools like php-cron-scheduler. While effective, these solutions are not always accessible or intuitive, especially for beginners or in shared hosting environments without cron access.
Proposal: Introduce a native scheduling interface or runtime task manager, perhaps via a new API like php_schedule('*/5 * * * *', function() { ... });. This could optionally integrate with the PHP CLI server, FPM, or a long-running worker process.
Benefits:
Simplifies background task setup for PHP-based applications
Enables more powerful CLI tools and async job handling
Enhances developer experience for platforms like Laravel, Symfony, and WordPress
Reduces reliance on OS-level configuration
Would love to hear thoughts, challenges, and ideas on this — could this be part of the true_async movement too?
Beta Was this translation helpful? Give feedback.
All reactions