Automatic import by Server Cron Job

The default way of automatically importing Vimeo videos using Vimeotheque PRO is to use the WP Cron system to trigger the imports. While this works in most cases, if you need to trigger imports at a constant time interval you will need to use the Conditional imports option.

This is needed because the WP Cron is triggered by your website visitors. If you don’t have a constant flow of visitors on your website you will notice that the automatic import queue gets delayed. This is not a reliable way as you don’t have any control over this process and don’t know if it’s going to update the playlist on a timely basis.

To solve this issue the plugin has a feature to set up a conditional automatic import using a server cron job that you can configure from your cPanel or Plesk.

Conditional automatic imports don’t need the help of visitors to reload your website to trigger the automatic import. The server cron job triggers the WP Cron and then WP Cron will trigger the automatic import. This is a more reliable way as you have control over the system.

Enabling the conditional imports

To enable conditional automatic import, go to the plugin Settings, tab Import options and, check the Enable conditional automatic import option.

Vimeotheque PRO - Enable conditional automatic import option

After saving the settings you will notice a URL under Enable conditional automatic imports checkbox. When you visit this URL for the first time, it runs WordPress Cron which in turn runs the first automatic import. When you reload the URL a second time, WP Cron will run the second automatic import and so on.

You can use this URL to configure a server cron job from your cPanel.

Your URL is going to be different from the URL shown in the image.

Vimeotheque PRO - The conditional import URL

cPanel Cron Job setup

To set up a server cron job, you need to log in to your cPanel. Once you log in, you will find an option Cron Jobs in the ADVANCED section. Click on Cron Jobs.

Finding the Cron Jobs option in cPanel

You will see the options to add a new cron job. You can customize when you want to run the automatic import URL from here.

Let’s say we want to run the import process every 5 minutes. To do this, click on Common settings and select Once Per Five Minutes.

Setting up the Cron job in cPanel

In the Command section, copy and paste the following command. Make sure to replace the URL ( with your own.

$ curl -s > /dev/null

Adding the Cron Job URL in cPanel

The URL should be the same URL as the one you copied from the plugin settings after enabling the Conditional Import option.

Next, save the cron job by clicking the Add New Cron Job button.

In the Current Cron Jobs section, a new cron job will be added. You can click on Edit or Delete to edit or delete this cron job respectively.

How to edit and delete the cron job in cPanel

The cron job will run every 5 minutes and start the automatic import process from the import queue.

Was this article helpful?

Start your video site now!

Manage and coordinate your Vimeo channels, albums or videos with your WordPress website. Perfect fit for membership, portfolio, online courses or any type of video collection.

Get Vimeotheque PRO!