DOCS

Cron jobs

How to schedule a PHP script or URL to run automatically at set intervals in cPanel.

Posodobljeno 05.10.2026. 2 min branja

Cron runs a command at a set time, for example sending notifications, cleaning temporary files or WordPress tasks.

Creating a cron job#

  1. In cPanel open Advanced → Cron Jobs.
  2. Optionally enter an email address in Cron Email to receive command output.
  3. Under Add New Cron Job choose the frequency in Common Settings (e.g. Once Per Hour) or manually fill in minutes, hours, days, months and weekdays.
  4. Enter the command in the Command field.
  5. Click Add New Cron Job.

Example commands#

Running a PHP script (replace scyhost1 with your cPanel user, and check the PHP path in cPanel or with us):

bash
/usr/local/bin/php /home/scyhost1/public_html/cron.php >/dev/null 2>&1

Calling a URL:

bash
curl -s https://yourdomain.com/cron.php >/dev/null 2>&1

WordPress cron#

WordPress runs its tasks when the site is visited, which can be unreliable. For larger sites turn that off in wp-config.php:

php
define('DISABLE_WP_CRON', true);

and add a cron job that calls wp-cron.php every 15 minutes:

bash
curl -s https://yourdomain.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1

Vam je bil ta članek v pomoč?

Sorodni članki

Still need a hand?

Open a ticket and we will reply by email. The whole team sees your request.