$first_timestamp
$first_timestamp : int
Timestamp equivalent of @see $this->first_date
Class ActionScheduler_CronSchedule
$first_timestamp : int
Timestamp equivalent of @see $this->first_date
$recurrence : mixed
The recurrence between each time an action is run using this schedule.
Used to calculate the start date & time. Can be a number of seconds, in the case of ActionScheduler_IntervalSchedule, or a cron expression, as in the case of ActionScheduler_CronSchedule. Or something else.
$scheduled_timestamp : int
Timestamp equivalent of @see $this->scheduled_date
$first_date : \DateTime
The date & time the first instance of this schedule was setup to run (which may not be this instance).
Schedule objects are attached to an action object. Each schedule stores the run date for that object as the start date - @see $this->start - and logic to calculate the next run date after that - @see $this->calculate_next(). The $first_date property also keeps a record of when the very first instance of this chain of schedules ran.
$start_timestamp : null
Deprecated property @see $this->__wakeup() for details.
$cron : null
Deprecated property @see $this->__wakeup() for details.
__construct(\DateTime $start, \CronExpression|string $recurrence, \DateTime|null $first = null) : mixed
Wrapper for parent constructor to accept a cron expression string and map it to a CronExpression for this objects $recurrence property.
\DateTime | $start | The date & time to run the action at or after. If $start aligns with the CronSchedule passed via $recurrence, it will be used. If it does not align, the first matching date after it will be used. |
\CronExpression|string | $recurrence | The CronExpression used to calculate the schedule's next instance. |
\DateTime|null | $first | (Optional) The date & time the first instance of this interval schedule ran. Default null, meaning this is the first instance. |
__sleep() : array
Serialize cron schedules with data required prior to AS 3.0.0
Prior to Action Scheduler 3.0.0, recurring schedules used different property names to refer to equivalent data. For example, ActionScheduler_IntervalSchedule::start_timestamp was the same as ActionScheduler_SimpleSchedule::timestamp. Action Scheduler 3.0.0 aligned properties and property names for better inheritance. To guard against the possibility of infinite loops if downgrading to Action Scheduler < 3.0.0, we need to also store the data with the old property names so if it's unserialized in AS < 3.0, the schedule doesn't end up with a null recurrence.