The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Cron not running - a solution (2 posts)

  1. nddery
    Posted 3 years ago #

    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');
    if ( is_admin() )
      add_action( 'wp_loaded', 'uf_run_twitter_tools_cron', 1 );
    add_action( 'ufcronevery15', array( 'AKTT', 'import_tweets' ) );


  2. nddery
    Posted 3 years ago #

    Oh and one more thing, using the WP-Cron plugin, we've noticed that the every15min cron recurrence was not listed as available. We've added it manually as it was simpler but if the above the does work on it's own, you might have to do this too.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic