CronNudge

Published October 21, 2026

cPanel Cron Job Not Running? Why It Didn't Run

cPanel's Cron Jobs screen is the account's crontab. The system cron daemon runs each command as that cPanel user, with a short environment, starting in the account's home directory. "Not running" is usually one of these:

  • It runs and fails. The path, the PHP binary, the permissions, or a relative path is wrong.
  • It runs and you never see the output. Cron Email is empty, or the command discards its own output.
  • The schedule is not the one you think. The clock is the server's, a field is wrong, or the host limits how often a job may run.
  • The host has hidden the Cron Jobs screen, or it stops jobs that run too long.

A job on a machine you administer, where you can read the cron log, is crontab not running. This page is the hosting-panel case. On Plesk, see Plesk scheduled task not running.

How cPanel cron works

The screen is cPanel » Home » Advanced » Cron Jobs. The host can hide it. Feature Manager in WHM lists that screen as the Cron Jobs feature (WHM » Home » Packages » Feature Manager). A missing menu is that feature turned off, or a theme that places the screen somewhere else. Ask the host. Hiding the screen is a separate fact from whether a job already saved is still scheduled.

Common Settings fills five boxes for you. The documented example is Once Per Hour (0 * * * *). You can type the fields yourself:

Box What it sets
Minute minute of the hour, or a step such as */5
Hour hour of the day
Day day of the month
Month month
Weekday day of the week

Every box, plus Command, has to be filled in. Add New Cron Job saves the row. Current Cron Jobs lists it. Edit opens the row, and Edit Line saves the change. Delete removes it.

Command is the program cron will run. The page says to specify the absolute path. Its example for a file in the home directory is /home/user/public_html/index.php. The same page's hourly walkthrough uses ./my-script.sh for a script that lives in the home directory, and it says that script needs the execute permission. A relative path is resolved from the home directory. A file under public_html needs cd or an absolute path. That is the next section.

Cron Email is the address that receives whatever the command prints. Type the address in Email and click Update Email. Remove the address to stop that mail for every job. For one job, the page says to edit the command and add /dev/null 2>&1. The documented example is:

/usr/local/cpanel/bin/is_script_stuck /dev/null 2>&1

There is no > before /dev/null. The shell passes /dev/null as an argument and joins stderr to stdout, so standard output is still there for Cron Email to collect. The redirect that discards both streams is >/dev/null 2>&1. That also discards the error you are trying to read. While a job is failing, append to a file. The output section below has that line.

The same page warns that a job scheduled too often can still be running when the next start arrives, and the server will start another copy. flock is the overlap section below.

With shell access, crontab -l prints the crontab this account owns. The Terminal screen is cPanel » Home » Advanced » Terminal. It appears when the account has shell access and the host has enabled SSH Access & Terminal in Feature Manager. SSH is the same shell when Terminal is hidden.

Why it does not run

Work down this list. Each item is a different check.

The PHP binary is not the one the site uses

A bare php in Command uses whatever php cron's PATH finds. On EasyApache 4 that can be the CGI binary at /usr/bin/php. The CLI binary is /usr/local/bin/php.

The EasyApache 4 file system layout names the two:

  • /usr/local/bin/php calls the php-cli binary for the configured version.
  • /usr/bin/php calls the php-cgi binary for the configured version.
  • /usr/local/bin/ea-php## is the php-cli symlink for one version. ## is two digits, so PHP 8.1 is /usr/local/bin/ea-php81.
  • /usr/bin/ea-php## is the php-cgi symlink for that version.
  • That version's SCL binaries are in /opt/cpanel/ea-php##/root/usr/bin.

Calling /usr/local/bin/php on a script under the account uses the PHP version configured for that directory. /usr/local/bin/ea-php81 stays on that CLI build when the directory's version should not decide.

On a server with CloudLinux alt-php, the control panel integration example names the binary /opt/alt/php74/usr/bin/php. The digits are the version. Confirm with that binary's -v. The php-cgi binary next to it is the CGI build.

Put the check in the cron command and read the file it writes. Minute, Hour, Day, Month, and Weekday are all *. Command is:

/bin/sh -c 'date; echo "PATH=$PATH"; which php; php -v; /usr/local/bin/php -v; env' >> /home/USER/logs/cron-env.log 2>&1

Replace USER with the cPanel username. Create the directory first: mkdir -p /home/USER/logs. Delete this row in Current Cron Jobs once the file has a few lines. An every-minute row is tighter than some hosts allow. If the file stays empty, check the host's documentation for a minimum interval.

which php and a bare php -v are the binary cron will run. /usr/local/bin/php -v is the CLI binary. When those versions differ, put the absolute CLI path in Command.

The path is relative, or the working directory is home

The hourly example ./my-script.sh finds a script in the home directory. ./public_html/scripts/job.php is that home-relative path. A PHP file that calls include 'config.php' or opens ./data.csv uses the same directory, the process's current directory, which is home. __DIR__ is the directory of the file that contains the include, which is what a script under public_html wants.

cd /home/USER/public_html && /usr/local/bin/php /home/USER/public_html/scripts/job.php

cd runs first. && runs PHP only when cd succeeds, so a wrong directory fails the command. The absolute path still names the file if the script later changes directory.

The script is not executable, or the line endings are Windows

When Command is the script path itself, the Cron Jobs page requires the execute permission. chmod 755 /home/USER/bin/job.sh sets it. Calling the interpreter yourself does not need that bit: /bin/bash /home/USER/bin/job.sh needs read permission on the file.

A shebang of #!/bin/bash saved from a Windows editor carries a carriage return. The kernel looks for /bin/bash with that extra character and reports /bin/bash^M: bad interpreter: No such file or directory. Strip the carriage returns on the server:

sed -i 's/\r$//' /home/USER/bin/job.sh

crontab -l | cat -A shows a carriage return as ^M. crontab(5) also wants each crontab entry to end in a newline. A line you paste in Terminal with crontab needs that final newline. Current Cron Jobs is the screen that saves the row for you.

An unescaped % changes the command

crontab(5) treats % in the command specially. An unescaped % becomes a newline, and everything after the first % is standard input to the command. A date format is the usual place this happens.

# % becomes a newline. The format never reaches date.
/bin/date +%F >> /home/USER/logs/job.log

# The backslash keeps the percent.
/bin/date +\%F >> /home/USER/logs/job.log

The five schedule boxes are separate. This rule applies to the text in Command, which is the command field cron stores. A format that comes out empty, or a command that seems to stop at the first %, needs \% on each percent.

Output is mailed nowhere, or thrown away

Cron Email receives the stdout and stderr the command did not redirect. An empty Email box means that mail is off for every job. A command that ends in >/dev/null 2>&1 drops both streams, so a PHP fatal error and a shell command not found never arrive.

Append to a file in the home directory while you are finding the fault:

>> /home/USER/logs/job.log 2>&1

Create /home/USER/logs before the first run. The file is the command's own output. Where a machine you administer stores the daemon's log, and how to rotate a file like this, is where are cron logs. On this account you do not have that daemon log. The file you redirected to is the one you can open in File Manager.

After the job is healthy, >/dev/null 2>&1 is the redirect that actually discards both streams. Keep the log redirect on any job you still need to diagnose.

The environment is not your shell

Cron does not read ~/.bashrc or ~/.bash_profile. Variables you exported in an SSH session are absent. crontab(5) sets HOME and LOGNAME from the account's passwd entry, and SHELL to /bin/sh, unless the crontab sets HOME or SHELL. PATH is the short list the daemon supplies when the crontab never sets it. A command that works after you ssh in can still be "not found" here.

Write the absolute path of each program. The variables, a mode 0600 env file, and the env dump are in cron job environment variables. The every-minute command above writes env into cron-env.log.

The clock is the server's

The Cron Jobs fields have no timezone box. crontab(5) matches the five fields against the daemon's clock, and it documents CRON_TZ for a zone on the crontab itself. The screen does not give you that variable. PHP's date.timezone changes date() inside a script. It leaves the schedule on the server clock.

Log date from the cron command, the same way as the PHP check above, or ask the host which timezone the server uses. Put that IANA name on the CronNudge check. The timezone field accepts an IANA name. Paste the five fields into the cron tool and read the next runs in that zone.

The host limits the interval or the runtime

Shared hosts often refuse a very frequent job, or kill a process that runs too long. The number is that host's policy. Check the host's documentation, or ask them, when a row saves and then never writes its log, or when a long PHP command stops in the middle of the log. This page does not list those limits. They differ by host.

The command calls a URL

A job that fetches the site is a normal Command. HTTP authentication, a redirect from http to https, a web application firewall rule, and a timeout all leave the cron row looking idle.

curl does not follow a redirect unless you pass -L. A 301 from http to https can exit 0 and never run the PHP. Use the https URL. -f makes an HTTP error status a failed command, -S still prints the error, and --max-time stops the wait:

/usr/bin/curl -fsS --max-time 30 -o /home/USER/logs/fetch.log https://example.com/cron.php

wget -q -O /dev/null https://example.com/cron.php is quiet and discards the body. -q also hides wget's error text, so Cron Email stays empty when the request failed. Prefer the curl line while you are looking for the fault. Replace /usr/bin/curl if command -v curl prints a different path.

A firewall rule that blocks the server's own address, including a ModSecurity rule, fails this request and leaves the PHP error log on the site untouched. The -o file is where curl's message goes.

A second run starts before the first one finishes

The Cron Jobs page warns that the next start can arrive while the previous command is still running, and the server starts another copy. flock -n takes a lock file and exits non-zero immediately when the lock is already held, so the second copy does not enter the script.

/usr/bin/flock -n /home/USER/tmp/job.lock /usr/local/bin/php /home/USER/public_html/scripts/job.php

mkdir -p /home/USER/tmp once, from Terminal. The lock file lives in the account, which is the directory this user can write. Replace /usr/bin/flock if command -v flock prints a different path. If that command prints nothing, the host does not provide flock. Other ways to keep a single copy are in prevent overlapping cron jobs.

Inspect it

Open Current Cron Jobs and read the five fields and Command. Then run the command yourself.

  1. In Terminal, or over SSH, run crontab -l and confirm the row is the one on screen.
  2. mkdir -p /home/USER/logs and add the every-minute date and env command from the PHP section. Open /home/USER/logs/cron-env.log after two minutes. A file that never appears means cron did not run the row.
  3. Copy Command into Terminal and run it. The shell there has your profile, so a success in Terminal only proves the program can run. The log from step 2 is the cron environment.
  4. Read Cron Email for the same minute. An empty inbox plus an empty log means the output was redirected away, or the command never started.

Remove the every-minute row when the log has the lines you needed.

A working setup

Create the directories once:

mkdir -p /home/USER/logs /home/USER/tmp /home/USER/bin /home/USER/public_html/scripts

This row is 03:00 every day. In Cron Jobs the five boxes are Minute 0, Hour 3, Day *, Month *, Weekday *. Command is the rest of the line, starting at cd. The whole line is valid crontab if you are in Terminal with crontab rather than the screen:

0 3 * * * cd /home/USER/public_html && /usr/bin/flock -n /home/USER/tmp/job.lock /bin/sh -c '/usr/local/bin/php /home/USER/public_html/scripts/job.php >> /home/USER/logs/job.log 2>&1 && /usr/bin/curl -fsS -m 10 --retry 3 https://cronnudge.com/ping/YOUR_ID > /dev/null || /usr/bin/curl -fsS -m 10 --retry 3 https://cronnudge.com/ping/YOUR_ID/fail > /dev/null'

Replace USER with the cPanel username and YOUR_ID with the ping id. cd sets the directory. flock -n runs the quoted command only when it gets the lock. Inside the quotes, && requests the bare ping URL only when PHP exits 0, and || requests /fail when PHP does not. && and || are left-associative, so a success ping that itself fails also requests /fail. PHP's output, including a fatal error, goes to the log. The ping body goes to /dev/null, and curl's own errors can still reach Cron Email.

A lock that is already held makes flock -n exit non-zero before the quoted command starts, so neither ping is sent. The missing success ping is the signal that the copy never entered the script.

The same job as a shell script. The file is /home/USER/bin/job.sh:

#!/bin/bash
set -euo pipefail
cd /home/USER/public_html
/usr/local/bin/php scripts/job.php >> /home/USER/logs/job.log 2>&1

chmod 755 /home/USER/bin/job.sh when Command is the script path. /bin/bash /home/USER/bin/job.sh runs it without that bit. Command:

/usr/bin/flock -n /home/USER/tmp/job.lock /bin/bash /home/USER/bin/job.sh && /usr/bin/curl -fsS -m 10 --retry 3 https://cronnudge.com/ping/YOUR_ID > /dev/null || /usr/bin/curl -fsS -m 10 --retry 3 https://cronnudge.com/ping/YOUR_ID/fail > /dev/null

When the lock is already held, flock -n exits non-zero, so || requests /fail and the check goes down for an overlap rather than a failed job, which is why the quoted /bin/sh -c command is the one to use when an overlap should not mark the check down.

WordPress on this account is the same screen. Define DISABLE_WP_CRON, then run due events from Command. One form, every five minutes (Minute */5, the other four boxes *):

*/5 * * * * cd /home/USER/public_html && /usr/bin/flock -n /home/USER/tmp/wp-cron.lock /usr/local/bin/wp cron event run --due-now --quiet >> /home/USER/logs/wp-cron.log 2>&1

Replace /usr/local/bin/wp with the path command -v wp prints. The constant, the HTTP request to wp-cron.php, and what a 200 response does not prove are in WP-Cron not running.

A Laravel app is the same absolute PHP binary in front of artisan schedule:run. That diagnosis is Laravel scheduler not running.

Monitor it with CronNudge

The heartbeat is a request to the bare ping URL after the command exits 0. CronNudge knows the schedule. Silence after the deadline is the alert. That silence is the same signal for a job the host disabled, a wrong PHP path, a process the host killed, and a host that was down. CronNudge only sees pings. It cannot read the host's cron log or job.log.

CronNudge accepts GET, POST, and HEAD. A stored ping answers ok.

The Command line above sends the bare URL on success and /fail otherwise. /fail marks the check down as soon as the request arrives. Leave the bare URL off the failure side. An optional request to https://cronnudge.com/ping/YOUR_ID/start before the work is the start ping. It is not a success.

?exit= on the success URL is the other failure form. A missing value, or a value outside 0 through 255, is ignored, and the success URL stays a success. 0 stays a success. Any other integer in that range is a failure. One line, with the exit code attached:

cd /home/USER/public_html && /usr/local/bin/php /home/USER/public_html/scripts/job.php >> /home/USER/logs/job.log 2>&1; code=$?; /usr/bin/curl -fsS -m 10 --retry 3 "https://cronnudge.com/ping/YOUR_ID?exit=$code" > /dev/null

Use this or the && / || line, not both in one command. The semicolon still runs the curl when cd or PHP fails, and $? is that status.

Create the check on the same five fields and the server's IANA timezone. 0 3 * * * at 03:00 server time is that cron. The timezone field accepts an IANA name. Paste the five fields into the cron tool and read the next runs.

Grace is added to the next scheduled time after a success ping. A success at 03:02, with cron 0 3 * * *, waits until 03:00 the next day and then adds grace. The form offers None, 1 minute, 5 minutes, 15 minutes, and 1 hour. Five minutes is the default. The API accepts any whole number of seconds from 0 through 7 days.

For a daily job, 5 minutes or 15 minutes still alerts that morning: the next slot is a day away, and grace is only added on top of it. For an hourly job, 15 minutes still fires when that hour never pings. One hour of grace on an hourly cron can hide the miss, because the next hour's ping can arrive before the deadline. Use 15 minutes when the schedule is hourly. Use 5 or 15 minutes when it is daily.

The form's period list starts at 5 minutes. A cron expression is rejected when its shortest gap is under the plan minimum. Free's minimum is 5 minutes. Pro's is 1 minute. A cPanel every-minute job is * * * * * in the five boxes, and that needs Pro. */5 * * * * and a daily job fit Free. The numbers are on pricing.

/start is how you time the run. Ping /start before the work and the bare URL after it, and turn on run tracking. Setting Max runtime turns run tracking on. Max runtime is 1 second through 7 days. Free includes assertions and run tracking on 3 checks. Pro removes that cap. The fields are in assertions, runs, and agents. A second /start while that run is still open is the overlap alert. It fires only with run tracking on. flock is the lock on the server. The overlap alert is a second signal when a second start ping arrives anyway.

A paused check stores the ping and does not alert. A failed ping, or no success ping by the deadline, is a down alert: "No successful ping arrived by the deadline." The next success after that is a recovery: "A successful ping arrived." A run that passes its max runtime without a finish ping is the stuck alert: "It passed its max runtime without a finish ping."

Free is 10 checks, a 5-minute minimum interval, email, and one Slack or Discord channel. Pro is $12 a month for 100 checks, a 1-minute minimum, signed webhooks, and the API.

The pattern for any scheduler is how to monitor cron jobs.

FAQ

Why is my cPanel cron job not running? The command runs and fails, the command runs and the output is discarded, the five fields are not the schedule you expect, or the host has limited cron or hidden the Cron Jobs screen. Append stdout and stderr to a file under the home directory, run that same command in Terminal, and compare php -v in the cron log with /usr/local/bin/php -v.

How do I see cPanel cron job output and errors? Set an address under Cron Email, and append the command with >> /home/USER/logs/job.log 2>&1. Current Cron Jobs does not store output. A command that ends in > /dev/null 2>&1 discards stdout and stderr, so the error never arrives. The documented /dev/null 2>&1 line, with no greater-than sign, does not discard stdout.

Which PHP path do I use in a cPanel cron job? Use /usr/local/bin/php. On EasyApache 4 that calls the php-cli binary for the configured version. /usr/bin/php calls the php-cgi binary. A specific CLI version is /usr/local/bin/ea-php##, with ## the two-digit version, so PHP 8.1 is /usr/local/bin/ea-php81. On CloudLinux alt-php the documented example binary is /opt/alt/php74/usr/bin/php, and the digits are the version. Log php -v from the cron command and compare.

What timezone does cPanel cron use? The five fields use the server's clock. Cron Jobs has no timezone box. PHP date.timezone changes date() inside a script and leaves the schedule where it is. Log date from a cron job, or ask the host, and put that IANA name on the check.

How do I stop cPanel cron emails without hiding errors? Remove the address in Cron Email to stop mail for every job. For one job, append stdout and stderr to a log file in the home directory. That keeps the error in a file you can open. > /dev/null 2>&1 stops the mail by discarding the output, including errors. Use the log file while the job is still failing.

How do I get alerted when a cPanel cron job doesn't run? Ping a CronNudge check from Command after the program exits 0, and request /fail when it does not. Use the same five fields and the server's IANA timezone. The missing ping is the alert for a disabled job, a wrong PHP path, a killed process, or a host outage. CronNudge only sees the pings. Free's shortest schedule is 5 minutes. An every-minute cPanel job needs Pro.


Run the command in Terminal, read the log file, and set Cron Email while you are still looking for the error. Create the check on those five fields and the server's zone, or paste them into the cron tool.