Knowledgebase

Creating a Cron Job in cPanel Print

  • cronjobsscheduledtasks, cron, cpanel, email, php, errors, guide, howto
  • 0

Step by step.

WHERE

cPanel, Advanced, Cron Jobs.

WHAT TO ENTER

A schedule, using the dropdowns or the five fields The command to run

THE EMAIL FIELD

Where output is sent.

Set it while testing, then consider clearing it or suppressing output.

Otherwise a job running every fifteen minutes emails you ninety-six times a day.

THE COMMAND

Usually the PHP binary, then the path to your script.

cPanel shows your home directory path elsewhere in the interface.

COMMON MISTAKES

A wrong path, so nothing runs Using a relative path, which does not work Forgetting the PHP binary A typographical error in the path

AFTER ADDING IT

Wait for one interval, then verify it ran.

TO TEST IMMEDIATELY

Temporarily set it to run every minute, verify, then set the real schedule.

TO EDIT OR REMOVE

The same screen lists existing jobs with edit and delete options.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot