Some beginners to the CyberSEO Pro plugin can be somewhat confused when setting up automatic content import, as they encounter two different options for configuring this process. On the General Settings page, they have to select the RSS pull mode, and in the settings for each specific feed, there exists its own option for Check this feed for updates every […] minutes. Let’s break down each of these individually.

RSS pull mode

This is a drop-down menu on the CyberSEO Pro General Settings page that lets you choose between two modes to launch the check of all your feeds for new posts. You can select one of the RSS pull modes:

CyberSEO Pro RSS pull mode

auto

If you choose the “auto” mode, the CyberSEO Pro’s Syndicator will be triggered by the WordPress’s built-in scheduler (pseudo-cron), and you’ll need to specify how often this should happen. You’ll need to specify a time interval in minutes to set the regularity for checking feeds for updates.

There’s an important detail to consider here. A PHP script isn’t a resident program that is continuously running in your server’s memory, like a Windows application running in the background until you close it completely. A PHP script is executed once at each launch, runs to completion, and then stops working until the next launch. When it comes to specific scripts like WordPress plugins, they are triggered the moment someone or something accesses your website. For example, when a visitor opens your site in a browser or when a search engine spider crawls your pages for indexing.

Therefore, the WordPress scheduler only triggers when your site is accessed from the outside. If you set its trigger period to, say, 60 minutes, it doesn’t necessarily mean it will trigger every hour. If no one visited your site (be it a human or bot) for several hours, it might not trigger at all during that time, even though you expect it to trigger exactly every hour. Keep in mind that the cron trigger period you set is desired but can’t guarantee adherence to your schedule. Thus, the reliability of the “auto” mode is far from perfect.

by cron or manually

If you select the “by cron or manually” mode, the Syndicator will only be triggered when a specific URL on your site is accessed. You will see this address under the “RSS pull mode” drop-down menu, and it will look something like this:

/usr/bin/curl --silent https://yoursite.com/?pull-feeds=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

The left part of the line, “/usr/bin/curl –silent,” is a command for cron. You can read more about configuring cron in the article “How to set up cron for CyberSEO Pro“. The right part of the line contains the actual URL link that must be opened manually in your browser or by an automatic external process, like a server cron. The moment this link is accessed, the processing of your feeds will be initiated, aiming to add new content from them to your site.

Please pay attention to the fact that the link includes a unique alphanumeric string after “?pull-feeds=”. This is your secret code, and you must keep it confidential. After all, you wouldn’t want a malicious individual to initiate the process of checking your feeds for updates at their own discretion, would you?

Check for updates every […] minutes

Now, let’s take a closer look at the Check this feed for updates every […] minutes option, located on the settings page of each feed. This option allows you to set a unique time interval for each feed, after which it will be checked for new content. If you want to pause the feed so it’s not automatically processed, simply set its refresh period to zero.

Check for updates every [...] minutes

When Syndicator is triggered by cron or the WordPress scheduler, it checks each feed to see if it’s time to process it. If it is, the feed will be processed, resulting in a new post. If it is not time to process the feed, it will be skipped by Syndicator until the next check. So if Syndicator is triggered every 10 minutes and a particular feed is configured to be fetched once a day, it will be fetched exactly once a day, not every 10 minutes as it might be in a cron setting.

As you can understand, this system allows you to flexibly set unique import or content generation periods for each feed. Please note that the plugin checks all your feeds for update times all together as one list, and this happens every time the checking process is triggered by cron or the WordPress scheduler.

Note that PHP creates a new process in the server’s memory each time you open in your browser the URL that triggers CyberSEO Pro’s Syndicator. If you open this link in your browser and refresh the page five times (e.g., by pressing F5), five instances of the script will be launched simultaneously in the server’s memory, processing the same list of feeds.

This is exactly the situation you should avoid! Make sure that the link is pulled by cron only at sufficient time intervals, allowing the launched script to fully execute and complete. Otherwise, duplicate posts may appear on your site because two independent processes running the same script on your server know nothing about each other. They process the same feed list, adding the same posts simultaneously. To safely prevent this scenario, make sure that the Cron or WordPress scheduler period you’ve set always overlaps at least twice the maximum PHP script execution time on your server. You can also adjust this value in the Max execution time field on the CyberSEO Pro General Settings page.

CyberSEO Pro max execution time

The CyberSEO Pro plugin provides robust and flexible options for managing and scheduling your feeds, giving you precise control over content updates and imports. Understanding and using these settings can greatly improve the efficiency and accuracy of your content management. However, careful consideration must be given to the configuration to avoid potential pitfalls such as duplicate posts or server memory overload. By following the guidelines above and customizing the settings to meet your specific needs, you can get the most out of this powerful tool and ensure that your site stays fresh and relevant with timely content. If you have any questions or need assistance with configuration, please refer to the documentation or contact support for personal assistance.

How to set up cron for CyberSEO Pro



Source link

By admin

Leave a Reply

Your email address will not be published. Required fields are marked *