
如何解决MAMP无法正常启动运行的问题
wp_get_ready_cron_jobs ( No parameters )
wp_get_ready_cron_jobs: 这个函数用来检索一个准备执行的计划中的cron作业数组。它根据当前时间检查预定的cron工作,并返回一个即将运行的工作数组。
检索准备运行的cron作业。
返回_get_cron_array()的结果,仅限于准备运行的事件,即,时间戳在过去。
function wp_get_ready_cron_jobs() { /** * Filter to preflight or hijack retrieving ready cron jobs. * * Returning an array will short-circuit the normal retrieval of ready * cron jobs, causing the function to return the filtered value instead. * * @since 5.1.0 * * @param null|array[] $pre Array of ready cron tasks to return instead. Default null * to continue using results from _get_cron_array(). */ $pre = apply_filters( 'pre_get_ready_cron_jobs', null ); if ( null !== $pre ) { return $pre; } $crons = _get_cron_array(); $gmt_time = microtime( true ); $results = array(); foreach ( $crons as $timestamp => $cronhooks ) { if ( $timestamp > $gmt_time ) { break; } $results[ $timestamp ] = $cronhooks; } return $results; }