Closed BenRutlandWeb closed 3 years ago
https://gist.github.com/BenRutlandWeb/2ed66b7e9578bdf23276891bb7db6159
A very rough version of the scheduler
Is the name required? As the events are non-recurring, a UUID could be generated for each job? That way a closure could be passed. OR, will it create many events for the same timing?
Is the name required? As the events are non-recurring, a UUID could be generated for each job? That way a closure could be passed. OR, will it create many events for the same timing?
Yes, otherwise the same event will be registered on every page load.
Is your feature request related to a problem? Please describe. The ability to simply create scheduled tasks.
Describe the solution you'd like A CRON-like scheduler to wrap
wp_schedule_event
.Describe alternatives you've considered Native WP functions, custom CRON tasks
Additional context
wp_schedule_single_event
instead of the repeated schedule, so no need to filter schedule "intervals"hourly
,weekly
etc. https://github.com/laravel/framework/blob/8.x/src/Illuminate/Console/Scheduling/ManagesFrequencies.php