cron

Triggered after the execution of CRON jobs.

Helpdesk

Input (passed by reference)

$params['last_cron_time'] int|null UNIX timestamp of the previous CRON job execution session. Or NULL if no CRON jobs have been executed yet.
… your plugin code …

Output

Helpdesk

Plugin code example

PHP

public function cron($params)
{
    if ($params['last_cron_time']) {
        sprintf_wp(
            'A CRON job has been executed. The previous job was executed at %s.',
            date('H:i:s Y-m-d')
        );
    } else {
        $message = _wp('A CRON job has been executed.');
    }

    waLog::log($message, 'myplugin.log');
}