Skip to main content

cPanel Guide

Here's How to Set Up a Cron Job in cPanel That Actually Runs

Schedule a recurring task in cPanel's Cron Jobs tool and understand exactly what the five timing fields and the command line are actually doing.

5 Fields

Minute, hour, day, month, weekday make up a cron schedule

1 Min

Smallest interval a cron job can be scheduled to run at

Free

Cron Jobs tool included in the cPanel-style panel

24/7

Human support if a scheduled job isn't firing

In short

Here's how to set up a cron job in cPanel: open the Cron Jobs tool, choose or type values for the five timing fields (minute, hour, day of month, month, and weekday), and enter the command to run — a PHP script path, a wget or curl call to a URL, or a shell command. Clicking Add New Cron Job schedules it to run automatically on that recurring pattern going forward.

The five fields work together, not separately: a cron set to minute 0, hour 3, and every day/month/weekday runs once daily at 3:00 AM, while leaving a field as an asterisk means 'every value' for that position.

A cron job is a scheduled, recurring command that runs automatically at set intervals without anyone triggering it manually — commonly used for clearing a cache, sending a WordPress plugin's scheduled emails more reliably than its built-in scheduler, running a backup script, or pinging a URL to keep something warmed up. cPanel's Cron Jobs tool provides a form-based way to set this up without editing a crontab file by hand.

This guide breaks down the five timing fields cron uses, shows the common shorthand options cPanel provides, and walks through three real command types — a PHP script, a wget call, and a curl call — along with the syntax each one actually needs to run correctly.

How to Set Up a Cron Job in cPanel: The Five Timing Fields

Cron timing is written as five values in this order: minute (0-59), hour (0-23), day of month (1-31), month (1-12), and weekday (0-6, where 0 is Sunday). An asterisk (*) in any field means 'every value' for that position, so a cron set to * * * * * runs every single minute, every hour, every day.

cPanel's Cron Jobs form provides dropdowns with common shorthand for each field (Every Minute, Every Hour, and so on) so the raw syntax rarely needs to be typed by hand, though understanding what those dropdowns actually produce matters once a schedule gets more specific — like running only on weekdays, or only on the 1st of the month.

Reading a Real Example

A cron set to 30 2 * * * runs at 2:30 AM every day (minute 30, hour 2, every day of month, every month, every weekday). A cron set to 0 0 1 * * runs at midnight on the 1st of every month, regardless of which weekday that falls on. A cron set to 0 9 * * 1 runs at 9:00 AM only on Mondays (weekday value 1), every week.

Getting the order wrong is the single most common mistake — putting the hour where the minute should be, for instance, produces a schedule that technically runs but at completely the wrong time, which is easy to miss until whatever the job was supposed to do simply hasn't happened.

Writing the Command: PHP, wget, and curl

For a PHP script, the command typically looks like php /home/username/public_html/script.php, using the full server path to the file rather than a URL, since cron runs the script directly rather than through a browser request. This is the standard approach for a script that needs to run with PHP's CLI rather than being fetched over the web.

For pinging a URL on a schedule (a common pattern for cache-clearing endpoints or scheduled webhooks), wget -q -O /dev/null 'https://yoursite.com/cron-endpoint.php' or the curl equivalent, curl -s 'https://yoursite.com/cron-endpoint.php' > /dev/null, both fetch the URL silently and discard the output, which is exactly what's wanted when the job's real effect happens server-side and no output needs to be seen.

Confirming It's Actually Running

cPanel can be set to email the account owner the output of every cron run, which is useful for confirming a new job fires correctly at first, but worth turning off (by adding an email field left blank, or redirecting output to /dev/null in the command) once it's confirmed working, since a frequent cron job emailing every run quickly becomes noise.

If a job doesn't seem to be running, the most common causes are an incorrect file path in a PHP command, a URL that requires authentication a plain wget or curl call can't provide, or a timing field entered in the wrong order — checking the exact command and schedule against a working example is the fastest way to spot which one applies.

How to Set Up a Cron Job in cPanel

Automation Without Fighting the Syntax

Hosting Cheap's cPanel-style panel includes the standard Cron Jobs tool with dropdown shorthand for common schedules, so a recurring task can be set up correctly without memorizing raw cron syntax from scratch.

For anything that isn't firing as expected, 24/7 human support can check server-side logs and confirm whether a scheduled command actually ran and what it returned.

  • Cron Jobs tool with dropdown shorthand for common schedules
  • Support for PHP, wget, and curl based cron commands
  • Pure NVMe SSD + LiteSpeed for fast scheduled script execution
  • 24/7 human support for jobs that aren't firing correctly

Why Hosting Cheap

What you get

Straightforward Cron Jobs Tool

Schedule recurring tasks through a form instead of editing a raw crontab file.

Common Schedule Shorthand

Dropdowns for Every Minute, Every Hour, and similar patterns cover most needs instantly.

Pure NVMe SSD + LiteSpeed

Scheduled PHP scripts and URL calls execute quickly on fast infrastructure.

Daily Backups

A safety net in place in case a scheduled script makes an unwanted change.

24/7 Human Support

Get help interpreting cron output or diagnosing a job that never fires.

1-Click Installers

Apps that rely on scheduled tasks, like some CMS plugins, install alongside cron support.

How It Works

Get set up in a few steps

1

Open Cron Jobs in cPanel

Find the Cron Jobs tool from the cPanel dashboard's Advanced section.

2

Set the five timing fields

Choose minute, hour, day of month, month, and weekday values or shorthand dropdowns.

3

Enter the command and add the job

Type the PHP, wget, or curl command to run, then click Add New Cron Job.

Included

Everything you need, on every plan

  • Timing fields entered in the correct order: minute, hour, day, month, weekday
  • Command tested manually once before relying on the schedule
  • Full server file path used for PHP script commands, not a relative path
  • Output silenced or redirected once a job is confirmed working
  • Email notifications limited to jobs where output actually matters
  • URL-based commands (wget/curl) point to endpoints that don't require login
  • Schedule interval matches the actual need, not set unnecessarily frequent

FAQ

Frequently asked questions

What order do the cron timing fields go in?

Minute, hour, day of month, month, then weekday, in that exact order. Getting the order wrong is the most common reason a cron job runs at the wrong time rather than not at all.

What does an asterisk mean in a cron field?

An asterisk means 'every value' for that field's position. A schedule of * * * * * runs every minute of every hour, every day.

How do I run a PHP script on a schedule?

Use the full server path in the command field, such as php /home/username/public_html/script.php, so cron executes it directly with PHP's CLI rather than expecting a web request.

What's the difference between using wget and curl in a cron job?

Both fetch a URL and can discard the output, but the exact flags differ slightly — wget -q -O /dev/null and curl -s ... > /dev/null are the common equivalents. Either works for pinging a URL-based endpoint on a schedule.

Why is my cron job emailing me every time it runs?

cPanel sends the command's output to the account email by default unless that's disabled. Redirecting output to /dev/null in the command, or clearing the notification email field, stops the emails.

Why doesn't my cron job seem to be running at all?

Common causes are an incorrect file path, timing fields entered in the wrong order, or a URL command hitting an endpoint that requires login credentials a plain wget or curl call can't supply.

Automate Recurring Tasks the Easy Way

cPanel's Cron Jobs tool and 24/7 human support make scheduling reliable, not fiddly.

Get Started