Cron not running – a solution
-
We’ve been having some problems lately with Twitter Tools and Social plugins. Twitter Tools relies on Social
social_cron_15
hook to update the twitter messages. However, according to the codex, “For some reason there seems to be a problem on some systems where the hook must not contain underscores or uppercase characters.” (wp_schedule_event).We’ve since then added this function to our functions.php file and it solved the problem – notice the hook, no underscore.
function uf_run_twitter_tools_cron() { if (Social::option('cron') == '1') : if (wp_next_scheduled('ufcronevery15') === false) : wp_schedule_event(time() + 900, 'every15min', 'ufcronevery15'); endif; endif; } if ( is_admin() ) add_action( 'wp_loaded', 'uf_run_twitter_tools_cron', 1 ); add_action( 'ufcronevery15', array( 'AKTT', 'import_tweets' ) );
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Cron not running – a solution’ is closed to new replies.