Overview

Namespaces

  • Cron
  • None

Classes

  • AbstractField
  • CronExpression
  • DayOfMonthField
  • DayOfWeekField
  • FieldFactory
  • HoursField
  • MinutesField
  • MonthField
  • YearField

Interfaces

  • FieldInterface
  • Overview
  • Namespace
  • Class
  • Tree

Class DayOfMonthField

Day of month field. Allows: * , / - ? L W

'L' stands for "last" and specifies the last day of the month.

The 'W' character is used to specify the weekday (Monday-Friday) nearest the given day. As an example, if you were to specify "15W" as the value for the day-of-month field, the meaning is: "the nearest weekday to the 15th of the month". So if the 15th is a Saturday, the trigger will fire on Friday the 14th. If the 15th is a Sunday, the trigger will fire on Monday the 16th. If the 15th is a Tuesday, then it will fire on Tuesday the 15th. However if you specify "1W" as the value for day-of-month, and the 1st is a Saturday, the trigger will fire on Monday the 3rd, as it will not 'jump' over the boundary of a month's days. The 'W' character can only be specified when the day-of-month is a single day, not a range or list of days.

Cron\AbstractField implements Cron\FieldInterface
Extended by Cron\DayOfMonthField
Namespace: Cron
Author: Michael Dowling <mtdowling@gmail.com>
Located at Scheduling/Vendor/CronExpression/src/Cron/DayOfMonthField.php
Methods summary
public boolean
# isSatisfiedBy( DateTime $date, string $value )

Check if the respective value of a DateTime field satisfies a CRON exp

Check if the respective value of a DateTime field satisfies a CRON exp

Parameters

$date
DateTime
$date DateTime object to check
$value
string
$value CRON expression to test against

Returns

boolean
Returns TRUE if satisfied, FALSE otherwise
public Cron\FieldInterface
# increment( DateTime $date, boolean $invert = false )

When a CRON expression is not satisfied, this method is used to increment or decrement a DateTime object by the unit of the cron field

When a CRON expression is not satisfied, this method is used to increment or decrement a DateTime object by the unit of the cron field

Parameters

$date
DateTime
$date DateTime object to change
$invert
boolean
$invert (optional) Set to TRUE to decrement

Returns

Cron\FieldInterface
public boolean
# validate( string $value )

Validates a CRON expression for a given field

Validates a CRON expression for a given field

Parameters

$value
string
$value CRON expression value to validate

Returns

boolean
Returns TRUE if valid, FALSE otherwise
Methods inherited from Cron\AbstractField
isInIncrementsOfRanges(), isInRange(), isIncrementsOfRanges(), isRange(), isSatisfied()
API documentation generated by ApiGen 2.8.0