WordPress crons are an important part of any WordPress site, as they allow for tasks such as scheduling posts and automated backups to be carried out. Configuring WordPress crons can be a simple process and is essential for keeping your site running smoothly. In this article, we’ll discuss how to configure WordPress crons so you can keep your site up-to-date and running smoothly.
1. How does wp-crone works?
Listivo use WP-Cron system to send emails and sms. WP-Cron does not run constantly; it is only triggered on page load. Someone will need to visit your website to trigger sending email or sms functions. In the WordPress it works the same with e.g. Scheduling Posts (learn more here about WP-Cron system)
2. How to make it better and be sure notifications are sent in up to 1 minute
A) Create free account at cron-job.org
B) Click the "CREATE CRON JOB" button
C) Add Title
D) Fill the URL field the same as the example below:
http://domain.com/wp-cron.php to your link - please make sure you enter your domain and that it has good protocol (http or https). Make sure the link is finished with: /wp-cron.php as the example aboveChange example
E) Set execution schedule (Every 1 Minute)
F) Click Create
Done. Cron-job.org will now, every minute, force WordPress to check your website "Cron Events". T
All email/sms notifications will be sent in up to 1 minute.
3. Next, you’ll need to edit the ‘wp-config.php’ file. To do this, you’ll need to add the following line of code to it:
This code will tell WordPress to disable the default cron and use a real cron. This is important, as the default cron can cause issues with scheduling tasks and backups.
By following these steps, you’ll be able to configure WordPress crons and ensure that your site runs smoothly and efficiently. Be sure to test the cron job regularly to ensure that it’s running correctly.
4. Done, please check this important information
A) If you are testing the email notification, please consider if there is no "email address conflict". On some servers when the primary WordPress email is the same as the user to which you send a Private Message will not receive email. It is blocked by hosting or an email box.
B) If you are testing sms notifications and still have a Twilio trial account, you can send notifications only to verified phone numbers.