Quick Jump:

  1. Why don’t the scheduler events trigger? Nothing is happening.
  2. Can I turn off WP-Cron and use server cron jobs instead?
  3. I’m seeing the message “Error: [plugin] hook not found, likely another plugin misuse of cron_schedules. See FAQ.” What is that?
  4. Why does the Scheduler use hours? Why can’t I query every X minutes or seconds?
  5. I’m doing a query on a channel full of content but not getting any results. Why?
  6. How can I use schema.org microdata for the videos?
  7. How can I convert VideoDuration into other formats?
  8. I’m getting strange characters when I save my feeds. What is it?

  1. Why don’t the scheduler events trigger? Nothing is happening.

    • The plugin hooks into the WordPress WP-Cron for scheduling. These cron events are only checked when a visitor loads any WordPress page on the site. If there are no visitors, there can be no cron checks and therefore no scheduler checks.
    • If you are using a caching plugin, WP-Cron won’t be called until a cached page is rebuilt.
    • If you are using .htaccess to allow,deny by IP, make sure to allow the IP of your WordPress site itself as the WP-Cron uses that IP address.
  2. Can I turn off WP-Cron and use server cron jobs instead?

    • Yes, if you have a traffic site over 300 visitors per day this may be a better solution.
      1. Edit /wp-config.php and add the line
        define('DISABLE_WP_CRON', true);
      2. Edit your cron on the server via the command line with ‘crontab -e’ or administration panel and add the line
        */5 * * * * wget -q -O -"http://www.mydomain.com/wp-cron.php?doing_wp_cron=`date +\%s`" > /dev/null2>&1

        and change ‘mydomain’ to your site domain.

      This crontab entry will call wp_cron.php every 5 minutes and trigger any scheduled action hooks.

      If you are unfamiliar with cronjobs and/or are unable to edit your server’s cron you may use a web based cron service such as EasyCron.

  3. I’m seeing the message “Error: [plugin] hook not found, likely another plugin misuse of cron_schedules. See FAQ.” What is that?

    • This happens when another plugin incorrectly replaces cron_schedules with their own schedules instead of correctly adding to the existing schedules. This means the other plugin actually wipes out all existing cron hooks set by WordPress and plugins, including our plugin hook. The offending plugin code needs to be fixed or deactivated. I’ve only seen this happen with two other plugins – 1 was fixed and the other is no longer supported (php my video blog), but there are many many plugins out there. The chances of seeing this are slim, but if you do see this message, please let me know the offending plugin.
  4. Why does the Scheduler use hours? Why can’t I query every X minutes or seconds?

    • The various video sites have daily quotas and/or throttling, so it’s best to request 100 videos an hour than it is 1 video a minute. If you want to publish the posts at that frequency, save them in bulk as Drafts and use the free plugin Auto Post Scheduler.
  5. I’m doing a query on a channel full of content but not getting any results. Why?

    • The plugin queries the API for any videos attached to the channel. If the channel is only composed of playlists of videos, the API will return no video results.
  6. How can I use schema.org microdata for the videos?

    • We can add this right into the Post Content Template for the video feed. Here is an example:
      <div itemscope itemtype='http://schema.org/VideoObject'>
      <meta itemprop='name' content='%VideoTitle%'><meta itemprop='thumbnailURL' content='%VideoImage%'><meta itemprop='embedURL' content='%VideoUrl%'><meta itemprop='width' content='640'><meta itemprop='height' content='480'>
      <p style='text-align:center;'>[embed width='640' height='480']%VideoUrl%[/embed]</p>
      <p><span itemprop='description'>%VideoDescription%</span></p>
      </div>
      

  7. How can I convert VideoDuration into other formats?

    • You can attach an action to when the VideoDuration post meta is added and perform your conversion. For instance the following code should be added to your theme’s functions.php file if you want to convert the VideoDuration from HH:MM:SS into just seconds and save it under the post meta key ‘VideoSeconds’:
      function video_duration_convert( $meta_id, $post_id, $meta_key, $meta_value ) {
              if ( 'VideoDuration' == $meta_key ) {
                      sscanf($meta_value, "%d:%d:%d", $hours, $minutes, $seconds);
                      $secs = isset($seconds) ? $hours * 3600 + $minutes * 60 + $seconds : $hours * 60 + $minutes;
                      add_post_meta( $post_id, 'VideoSeconds', $secs );
              }
      }
      
      add_action('added_post_meta', 'video_duration_convert', 10, 4);
  8. I’m getting strange characters when I save my feeds. What is it?

    charset

    • This might happen on older PHP versions that are not using the UTF-8 charset (default since PHP 5.4). You can either upgrade to a supported PHP version or modify your PHP .ini file to set the default_charset to UTF-8.