ActionScheduler_NullSchedule
ActionScheduler_NullSchedule represents an async action with no scheduled date. It intentionally has no run time and is used for actions that should run as soon as the queue runner can process them.
Class definition
class ActionScheduler_NullSchedule extends ActionScheduler_SimpleSchedule {
public function __construct( ?DateTime $date = null );
public function __sleep();
public function __wakeup();
}
When it’s used
Use this schedule for async actions where no specific run time is stored. In the Action Scheduler core, a NullSchedule indicates a pending async action (get_date() returns null).
Next-run calculation
get_date()returnsnullbecause there is no scheduled date.calculate_next()is inherited fromActionScheduler_SimpleScheduleand returnsnull.get_next( DateTime $after )(fromActionScheduler_Abstract_Schedule) will always returnnullbecause the stored schedule date isnull.
Recurrence
is_recurring()is inherited fromActionScheduler_SimpleScheduleand returnsfalse.
Serialization behavior
__sleep() returns an empty array and __wakeup() resets the scheduled date to null, since there is no DateTime instance to serialize.