+++ title = "Cron" weight = 10
+++
The following hooks are provided for Cron related events.
Runs each time that the system calls the system cron job. This occurs after all scheduled tasks finish.
Variable | Type | Notes |
---|---|---|
No input parameters for this hook point. |
No response supported
<?php
add_hook('AfterCronJob', 1, function($vars) {
// Perform hook code here...
});
Runs at the very end of the daily automation cron execution.
Variable | Type | Notes |
---|---|---|
No input parameters for this hook point. |
No response supported
<?php
add_hook('DailyCronJob', 1, function($vars) {
// Perform hook code here...
});
Runs after tasks have completed but before email report is sent.
Variable | Type | Notes |
---|---|---|
No input parameters for this hook point. |
Return true to surpress email report.
<?php
add_hook('DailyCronJobPreEmail', 1, function($vars) {
// Perform hook code here...
});
Executes when the POP email collection cron completes.
Variable | Type | Notes |
---|---|---|
connectionErrors | array | An array of errors if an error occurred while attempting to connect to one or more mailboxes |
No response supported
<?php
add_hook('PopEmailCollectionCronCompleted', 1, function($vars) {
// Perform hook code here...
});
Executes after an automation task occurs
Variable | Type | Notes |
---|---|---|
task | \Collection | |
completed | bool |
No response supported
<?php
add_hook('PostAutomationTask', 1, function($vars) {
// Perform hook code here...
});
Executes before an automation task occurs
Variable | Type | Notes |
---|---|---|
task | \Collection |
No response supported
<?php
add_hook('PreAutomationTask', 1, function($vars) {
// Perform hook code here...
});
Runs before the daily automation cron execution.
Variable | Type | Notes |
---|---|---|
No input parameters for this hook point. |
No response supported
<?php
add_hook('PreCronJob', 1, function($vars) {
// Perform hook code here...
});