Comments (2)
Note: pre_next_scheduled
was removed during the WordPress beta period. The logic for getting the next schedule task should now be included as part of the pre_get_scheduled_event
filter.
The description of this ticket has been updated to reflect these changes.
from cavalcade.
Notes:
HM\Cavalcade\Plugin\Job
class changes:
- 🆕
query( $event )
Searches for a single registered job depending on the event attributes.- no
$timestamp
return the next event - no
$hook
fail (WP Core should catch this beforehand anyway) - no
$schedule
or$interval
search single events
- no
🆕 get_jobs_by_hook( $hook, $args = null )
- no
$hook
fail $args === null
return all jobs on hook regardless of arguments
- no
get_by_site()
- Add parameter for limiting to ready jobs only, default to
false
- Add parameter for limiting to ready jobs only, default to
HM\Cavalcade\Plugin\Connector
changes
schedule_event()
andschedule_recurring_event()
- Unchanged for backward compatibility/direct changes to cron array.
🆕 pre_schedule_event( $pre, $event )
- Search for existing job with
Job::get_job_by_attributes()
- Save/Update via
schedule_event()
if required - Recurring jobs with the same
$timestamp
but new$schedule
/$interval
replace existing task
- Search for existing job with
- 🆕
pre_reschedule_event()
- Search for existing job with
Job::get_job_by_attributes()
- Modify
$timestamp
(nextrun + interval, per cavalcade design) - Update via
schedule_event()
- Search for existing job with
- 🆕
pre_unschedule_event()
- Search for existing job with
Job::get_job_by_attributes()
Job::delete()
- Search for existing job with
- 🆕
pre_clear_scheduled_hook()
- also used for
pre_unschedule_hook
filter - Search for existing jobs with
Job::get_jobs_by_hook()
- Delete returned jobs
- also used for
🆕 pre_get_scheduled_event()
- Search for existing job with
Job::get_job_by_attributes()
- return it
- Search for existing job with
🆕 pre_get_ready_cron_jobs()
- return
Job::get_by_site()
limited to ready jobs only.
- return
from cavalcade.
Related Issues (20)
- Cron filters are not registered early enough HOT 3
- --allow-root HOT 3
- Access to wp-cron.php should be disabled when Cavalcade is in use HOT 2
- Issues with the index on `nextrun` HOT 14
- PHP 8.0 composer support
- WordPress 5.7 support HOT 3
- wp_schedule_single_event not executing function when calvacade is running on server but works locally
- Results of get_jobs_by_query can give stale timestamps for recurring jobs
- Existing jobs HOT 2
- Some CRON events are not executed (Large WP Multisite) HOT 10
- Question: How do determine whether Cavalcade is active from other Code? HOT 1
- Cavalcade is not working? HOT 1
- Why does Cavalcade do so much on every page load? HOT 3
- Performance issues if checking for schedules during every page load HOT 11
- Command that takes a job id and sets status to 'failed'
- Quick questions HOT 2
- Possible Wrong Version Display and LOG disabling solution HOT 2
- PHP Warning with PHP8.2 HOT 2
- Add `.gitattributes` file to exclude files not needed in composer installs. HOT 1
- Allow to not replay every missing events HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cavalcade.