\ActionScheduler_CanceledSchedule

Class ActionScheduler_SimpleSchedule

Summary

Methods
Properties
Constants
calculate_next()
is_recurring()
__sleep()
__wakeup()
__construct()
get_next()
get_date()
next()
No public properties found
No constants found
No protected methods found
$scheduled_timestamp
N/A
No private methods found
$timestamp
$scheduled_date
N/A

Properties

$scheduled_timestamp

$scheduled_timestamp : int

Timestamp equivalent of @see $this->scheduled_date

Type

normal

$timestamp

$timestamp : null

Deprecated property @see $this->__wakeup() for details.

Type

normal

$scheduled_date

$scheduled_date : \DateTime

The date & time the schedule is set to run.

Type

\DateTime

Methods

calculate_next()

calculate_next(\DateTime  $after) : \DateTime|null

Calculate when the next instance of this schedule would run based on a given date & time.

Parameters

\DateTime $after

Timestamp.

Returns

\DateTime|null

is_recurring()

is_recurring() : bool

Action is not recurring.

Returns

bool

__sleep()

__sleep() : array

For PHP 5.2 compat, because DateTime objects can't be serialized

Returns

array

__wakeup()

__wakeup() : mixed

Unserialize recurring schedules serialized/stored prior to AS 3.0.0

Prior to Action Scheduler 3.0.0, 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 maintain backward compatibility with schedules serialized and stored prior to 3.0, we need to correctly map the old property names with matching visibility.

Returns

mixed

__construct()

__construct(\DateTime  $date) : mixed

Construct.

Parameters

\DateTime $date

The date & time to run the action.

Returns

mixed

get_next()

get_next(\DateTime  $after) : \DateTime|null

Cancelled actions should never have a next schedule, even if get_next() is called with $after < $this->scheduled_date.

Parameters

\DateTime $after

Timestamp.

Returns

\DateTime|null

get_date()

get_date() : \DateTime|null

Get the date & time the schedule is set to run.

Returns

\DateTime|null

next()

next(\DateTime  $after = null) : \DateTime|null

Get the date & time this schedule was created to run, or calculate when it should be run after a given date & time.

Parameters

\DateTime $after

DateTime to calculate against.

Returns

\DateTime|null