CronEvents final class
Minn\Runtime\CronEvents · public/minn/src/Minn/Runtime/CronEvents.php · 297 lines
Scheduled events as WordPress keeps them in the cron option: the list read (an old one upgraded) and stored, the schedules, single and recurring events added (a near duplicate refused), rescheduled, removed one by one, by hook or by arguments, looked up, and the due ones run; each step with the filters that may answer first.
Public
| static | all(): array# | The scheduled events by timestamp (_get_cron_array), an old list upgraded first; empty when there is none. @return array<int|string, mixed> |
| static | store(mixed $cron, mixed $wpError = false): mixed# | The events stored (_set_cron_array): whether they were, or the error saying they could not be when asked for one. |
| static | schedules(): array# | The schedules events recur on (wp_get_schedules): hourly, twice daily, daily and weekly, after the ones cron_schedules adds. @return array<string, mixed> |
| static | scheduleSingle(mixed $timestamp, mixed $hook, mixed $args = array ( ), mixed $wpError = false): mixed# | An event run once (wp_schedule_single_event): refused near a duplicate (ten minutes either side) or when a plugin says no. |
| static | schedule(mixed $timestamp, mixed $recurrence, mixed $hook, mixed $args = array ( ), mixed $wpError = false): mixed# | A recurring event (wp_schedule_event): refused for an unknown schedule or when a plugin says no. |
| static | reschedule(mixed $timestamp, mixed $recurrence, mixed $hook, mixed $args = array ( ), mixed $wpError = false): mixed# | A recurring event moved to its next run (wp_reschedule_event): the interval its schedule names, else the one the event carries. |
| static | unschedule(mixed $timestamp, mixed $hook, mixed $args = array ( ), mixed $wpError = false): mixed# | One event removed (wp_unschedule_event). |
| static | unscheduleHook(mixed $hook, mixed $wpError = false): mixed# | Every event of a hook removed, whatever its arguments (wp_unschedule_hook): how many, 0 for none. |
| static | clearHook(mixed $hook, mixed $args = array ( ), mixed $wpError = false, mixed ...$loose): mixed# | Every event of a hook with these arguments removed (wp_clear_scheduled_hook): how many, or the errors merged into one; arguments given loose (an old call) are taken as the list. |
| static | event(mixed $hook, mixed $args = array ( ), mixed $timestamp = NULL): mixed# | An event by hook and arguments, the next one or the one at a time (wp_get_scheduled_event), or false. |
| static | next(mixed $hook, mixed $args = array ( )): mixed# | When an event next runs (wp_next_scheduled), as wp_next_scheduled leaves it; false for none. |
| static | ready(): mixed# | The events due now (wp_get_ready_cron_jobs). @return array<int|string, mixed> |
| static | run(): mixed# | The due events run (wp_cron): each recurring one rescheduled first, each removed, then its hook fired with its arguments; how many ran. A failure to reschedule or remove is logged and told as cron_reschedule_event_error or cron_unschedule_event_error. |
| static | upgrade(mixed $cron): array# | An old event list keyed by hook alone, keyed again by its arguments' hash and stored (_upgrade_cron_array). @return array<int|string, mixed> |
Internals 2
Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.
Nothing matches.