Why my cron job was changed to run every 15 minutes
Ce contenu n’est pas encore disponible dans votre langue.
On shared hosting, cron jobs set to run more often than every 15 minutes are automatically changed to run every 15 minutes. This protects server performance for everyone on the server.
This only applies to shared hosting accounts.
Why this happens
Section titled “Why this happens”On a shared server, many websites share the same resources. Cron jobs that run every minute or every few minutes can use a lot of CPU and memory, which slows down your website and others on the server. Limiting how often they run keeps the server stable.
Set your cron job to a supported interval
Section titled “Set your cron job to a supported interval”When you add or edit a cron job in cPanel, choose an interval of 15 minutes or longer. For example, to run a script every 15 minutes:
*/15 * * * * /usr/local/bin/php /home/username/public_html/script.phpSee Setting up cron jobs in cPanel.
If you need tasks to run more often
Section titled “If you need tasks to run more often”- Rethink the task. Many tasks don’t need to run every minute. For example, a WordPress site can use a cron job every 15 minutes instead of its built-in WP-Cron.
- Upgrade to a Managed VPS. On your own server, you can schedule cron jobs as often as you need. See What is VPS hosting?
Related articles
Section titled “Related articles”Cette page vous a-t-elle aidé ?
Merci pour votre retour.