How do I configure a cron job? Print

  • 35

    1. go to cPanel.
    2. Locate and click on the "Cron Jobs" icon under the "Advanced" category.
  1. Fill in the required information.
    • Common Settings - You can use this dropdown list to populate all but the last fields.
    • Minute - The minute setting for the cron job.
    • Hour - The hour setting for the cron job.
    • Day - The day setting for the cron job.
    • Month - The month setting for the cron job.
    • Weekday - The weekday setting for the cron job.
    • Command - The cron job command to execute. If you wanted to execute a script, the command would look similar to this:
      • php -q /home/ACCOUNTNAME/public_html/script_in_my_root_directory.php

 

To simplify configuration, we include a drop-down menu with common settings such as Once Per Week or Once Per Month.

If you don’t find a setting that fits your needs in the main drop-down menu, enter a time interval in the boxes on the left or use the menus on the right to select from typical entries for each period.

Finally, enter the command or the path to your script in the Command field and hit the “Add New Cron Job” button to save. Cron will run the script automatically at the intervals you selected.

Cron is a simple but powerful tool for automating mundane, repetitive and easily forgotten server administration tasks. The interval format can be confusing at first, but a few minutes of study will save you many hours of work in the future, especially if you combine your knowledge with cPanel and WHM’s quick and easy configuration tools.

As always, if you have any feedback or comments, please let us know. We are here to help in the best ways we can. You’ll find us on Discord, the cPanel forums, and Reddit.


Was this answer helpful?

« Back