Property | Type | Description | |
---|---|---|---|
$command | string | Command string |
Property | Type | Description | |
---|---|---|---|
$_afterCallbacks | array | The array of callbacks to be run after the event is finished. | |
$_description | string | The human readable description of the event. | |
$_expression | string | The cron expression representing the event's frequency. | |
$_filter | Closure | The filter callback. | |
$_output | string | The location that output should be sent to. | |
$_reject | Closure | The reject callback. | |
$_timezone | DateTimeZone | string | The timezone the date should be evaluated on. | |
$_user | string | The user the command should run as. |
Method | Description | |
---|---|---|
__construct ( string $command, array $config = [] ) | Create a new event instance. | |
at ( string $time ) | Schedule the command at a given time. | |
buildCommand ( ) : string | Build the comand string. | |
cron ( string $expression ) | The Cron expression representing the event's frequency. | |
daily ( ) | Schedule the event to run daily. | |
dailyAt ( string $time ) | Schedule the event to run daily at a given time (10:00, 19:30, etc). | |
days ( array | integer $days ) | Set the days of the week the command should run on. | |
description ( string $description ) | Set the human-friendly description of the event. | |
emailOutputTo ( array $addresses ) | E-mail the results of the scheduled operation. | |
everyFiveMinutes ( ) | Schedule the event to run every five minutes. | |
everyMinute ( ) | Schedule the event to run every minute. | |
everyNMinutes ( integer | string $minutes ) | Schedule the event to run every N minutes. | |
everyTenMinutes ( ) | Schedule the event to run every ten minutes. | |
everyThirtyMinutes ( ) | Schedule the event to run every thirty minutes. | |
fridays ( ) | Schedule the event to run only on Fridays. | |
getDefaultOutput ( ) | ||
getExpression ( ) : string | Get the Cron expression for the event. | |
getSummaryForDisplay ( ) : string | Get the summary of the event for display. | |
hourly ( ) | Schedule the event to run hourly. | |
isDue ( |
Determine if the given event should run based on the Cron expression. | |
mondays ( ) | Schedule the event to run only on Mondays. | |
monthly ( ) | Schedule the event to run monthly. | |
run ( |
Run the given event. | |
saturdays ( ) | Schedule the event to run only on Saturdays. | |
sendOutputTo ( string $location ) | Send the output of the command to a given location. | |
skip ( Closure $callback ) | Register a callback to further filter the schedule. | |
sundays ( ) | Schedule the event to run only on Sundays. | |
then ( Closure $callback ) | Register a callback to be called after the operation. | |
thenPing ( string $url ) | Register a callback to the ping a given URL after the job runs. | |
thursdays ( ) | Schedule the event to run only on Thursdays. | |
timezone ( DateTimeZone | string $timezone ) | Set the timezone the date should be evaluated on. | |
tuesdays ( ) | Schedule the event to run only on Tuesdays. | |
twiceDaily ( ) | Schedule the event to run twice daily. | |
user ( string $user ) | Set which user the command should run as. | |
wednesdays ( ) | Schedule the event to run only on Wednesdays. | |
weekdays ( ) | Schedule the event to run only on weekdays. | |
weekly ( ) | Schedule the event to run weekly. | |
weeklyOn ( integer $day, string $time = '0:0' ) | Schedule the event to run weekly on a given day and time. | |
when ( Closure $callback ) | Register a callback to further filter the schedule. | |
yearly ( ) | Schedule the event to run yearly. |
Method | Description | |
---|---|---|
callAfterCallbacks ( |
Call all of the "after" callbacks for the event. | |
emailOutput ( yii\mail\MailerInterface $mailer, array $addresses ) | E-mail the output of the event to the recipients. | |
expressionPasses ( ) : boolean | Determine if the Cron expression passes. | |
filtersPass ( |
Determine if the filters pass for the event. | |
getEmailSubject ( ) : string | Get the e-mail subject line for output results. | |
runCommandInBackground ( |
Run the command in the background using exec. | |
runCommandInForeground ( |
Run the command in the foreground. | |
spliceIntoPosition ( integer $position, string $value ) : |
Splice the given value into the given position of the expression. |
public __construct ( string $command, array $config = [] ) | ||
$command | string | |
$config | array |
public buildCommand ( ) : string | ||
return | string |
protected callAfterCallbacks ( |
||
$app |
public description ( string $description ) | ||
$description | string |
protected emailOutput ( yii\mail\MailerInterface $mailer, array $addresses ) | ||
$mailer | yii\mail\MailerInterface | |
$addresses | array |
public emailOutputTo ( array $addresses ) | ||
$addresses | array |
public everyFiveMinutes ( ) |
public everyNMinutes ( integer | string $minutes ) | ||
$minutes | integer | string |
public everyTenMinutes ( ) |
public everyThirtyMinutes ( ) |
protected expressionPasses ( ) : boolean | ||
return | boolean |
protected filtersPass ( |
||
$app | ||
return | boolean |
protected getEmailSubject ( ) : string | ||
return | string |
public getExpression ( ) : string | ||
return | string |
public getSummaryForDisplay ( ) : string | ||
return | string |
protected runCommandInBackground ( |
||
$app |
protected runCommandInForeground ( |
||
$app |
public sendOutputTo ( string $location ) | ||
$location | string |
protected spliceIntoPosition ( integer $position, string $value ) : |
||
$position | integer | |
$value | string | |
return |
protected array $_afterCallbacks | ||
return | array |
protected string $_description | ||
return | string |
protected string $_expression | ||
return | string |
protected string $_output | ||
return | string |
protected DateTimeZone|string $_timezone | ||
return | DateTimeZone | string |
protected string $_user | ||
return | string |