A Cron job is a task that is scheduled to run at a specific time automatically. For example, a Cron job can back up a file every six hours automatically.
FS Poster uses the standard WordPress Cron Jobs for background shares and Scheduled posts. The default WordPress Cron Jobs might cause delays in your Schedules or background shares. Because, by default, WordPress does not use a real Cron job. Instead, whenever a page is loaded on a WordPress site by any user, WordPress runs the Cron Job Tasks. If nobody visits your WordPress site, your tasks will not run. As a result, your scheduled tasks will be delayed.
To resolve these issues, you should configure a real Cron job on your website. To do this, follow the instructions below:
- Go to the FS Poster > Settings > General settings > Cron Job settings;
- Enable the option and copy the Cron Job command to configure a real Cron job for FS Poster. You do not need to worry because the default Cron job will still work for your other plugins;
- Log in to Cpanel. If your hosting does not have the Cpanel, please get in touch with your hosting provider to create the Cron job;
- Go to Cron Jobs;
- Configure a real Cron Job on WordPress by adding the command we copied from the plugin to the command section. If you want the schedules to share posts at the exact time you defined on the schedule module, you need to set the Cron Job every minute. For example, if you put it to 10 minutes, it means it can delay up to 10 minutes:
If your server does not accept this Linux command because some characters are not allowed on your server, you can add one of the below commands. Please copy your website name from the search bar of the browser and replace https://www.fs-poster.com/ with your domain name in the command:
curl --silent --output /dev/null https://www.fs-poster.com/wp-cron.php?doing_wp_cron
curl https://www.fs-poster.com/wp-cron.php?doing_wp_cron
wget -O /dev/null https://www.fs-poster.com/wp-cron.php?doing_wp_cron
After setting up the Cron Jobs, you can see the result by going to FS Poster > Settings > General > Cron Job section. You can see when the last Cron Job ran. If it shows that it ran a long time ago, it means that the Cron Job does not run properly, and you need to contact your hosting provider to solve the Cron job running issue.
You can troubleshoot it by going to the URL manually and if you see that the Cron job ran after your manual interaction, it means that the host does not run the command correctly. Right-click on the highlighted website URL and go to the link as shown in the screenshot: