Path to Run PHP via Cron Jobs
Updated last month
If you want to run a task at regular intervals, you can configure different cron jobs from the control panel.
Access your cPanel at the following address (replacing "midominio.com" with your site's correct URL).
Once logged in, locate the Cron Jobs tool in the "Advanced" section of your cPanel.
If you want to run a PHP file, we recommend using the following format:
/usr/local/bin/php -q /home/usuario/public_html/script.php
Note: replace "usuario" with your actual username and make sure to complete the path to the file correctly.
/usr/local/bin/php ensures that the local PHP configuration you set up in your cPanel under Select PHP Version is always used.
Was this helpful?
Was this helpful?