Closed szepeviktor closed 1 year ago
I've found no way in core to look up when WordPress Cron ran the last time.
<?php add_filter( 'pre_set_transient_doing_cron', static function ($value) { update_option('cron_last_run', $value, 'no'); return $value; }, 0, 1 );
This MU plugin records the time of last run in an option called cron_last_run.
cron_last_run
Then it can be compared to current time: wp option get cron_last_run
wp option get cron_last_run
(I use Linux cron jobs to run WordPress Cron)
Thanks! Closing in favour of #19 which I'll get to... one day...
I've found no way in core to look up when WordPress Cron ran the last time.
This MU plugin records the time of last run in an option called
cron_last_run
.Then it can be compared to current time:
wp option get cron_last_run
(I use Linux cron jobs to run WordPress Cron)