> ## Documentation Index
> Fetch the complete documentation index at: https://speedypage.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Schedule cron jobs

> How to set up scheduled tasks (cron jobs) in cPanel to run PHP, Python, or other scripts automatically.

Cron jobs let you run scripts on a schedule: backups, cleanup tasks, sending emails, or anything else you'd normally trigger manually.

## Set up a cron job

<Steps>
  <Step title="Open the Cron Jobs page">
    Log in to cPanel through your [client area](https://my.speedypage.com) or at `yourdomain.com/cpanel`. Go to **Advanced** and click **Cron Jobs**.
  </Step>

  <Step title="Set the schedule">
    Use the dropdown menus to pick how often the job runs (e.g. every hour, once a day, once a week), or enter values manually in the minute/hour/day/month/weekday fields.
  </Step>

  <Step title="Enter the command">
    Type the full command to run your script. See the examples below for common formats.
  </Step>

  <Step title="Save">
    Click **Add New Cron Job**.
  </Step>
</Steps>

## Common command formats

### PHP scripts

```bash theme={null}
/usr/local/bin/php /home/username/public_html/script.php
```

Replace `username` with your cPanel username and adjust the path to match your script's location.

### Python scripts

```bash theme={null}
/usr/bin/python3 /home/username/public_html/script.py
```

### Using curl

```bash theme={null}
curl -s "https://yourdomain.com/script.php" > /dev/null 2>&1
```

This triggers your script through an HTTP request, which is useful when the script needs to run in a web context. The domain must be resolving correctly for this to work.

## Suppress email notifications

By default, cPanel sends an email every time a cron job runs. To disable this, add `>/dev/null 2>&1` at the end of the command:

```bash theme={null}
/usr/local/bin/php /home/username/public_html/script.php >/dev/null 2>&1
```

<Tip>
  Leave notifications enabled while testing a new cron job so you can verify it runs. Once confirmed, add the suppression to avoid filling up your mailbox.
</Tip>

## Test before scheduling

You can verify a command works by running it over SSH before adding it as a cron job. Log in via SSH and paste the same command you plan to use. If it produces the expected output, the cron job will work.

<Note>
  Cron jobs run according to the server's timezone. Check the time shown at the top of the Cron Jobs page in cPanel to see what timezone your server uses.
</Note>
