Cron Jobs

Cron Jobs

Cron jobs are scheduled tasks that take place at predefined times or intervals on the server. Often, a cron job is a series of simple tasks executed from a script file. cPanel offers this screen as a tool for setting up cron jobs.

note Note: Be careful when scheduling cron jobs. Setting them to run too often may slow down your server.

 

  • Adding a cron job
  • Viewing existing cron jobs
    • Editing a cron job
    • Deleting a cron job

 

Adding a cron job

To set up a cron job:

  1. If you want the system to email you whenever it runs a cron job, type your email address in the Email field. (If you do not wish to receive an email notifying you of a specific cron job, you can configure its command accordingly; see step 3 below.)
  2. Click Update Email.
  3. Configure the interval at which you wish to run the cron job.
    • Common Settings — This menu allows you to select a commonly used interval without having to specify settings for the minute, hour, day, month, and so on.
    • Minute — Use this drop-down menu to select the number of minutes between running the cron job, or the minute each hour on which you wish to run the cron job.
    • Hour — Use this drop-down menu to select the number of hours between running the cron job, or the hour each day on which you wish to run the cron job.
    • Day — Use this drop-down menu to select the number of days between running the cron job, or the day of the month on which you wish to run the cron job.
    • Month — Use this drop-down menu to select the number of months between running the cron job, or the month of the year in which you wish to run the cron job.
    • Weekday — Use this drop-down menu to select the day(s) of the week on which you wish to run the cron job.
  4. In the Command field, type the command you wish the system to run.
    • note Note: If you do not wish to receive an email notifying you of a specific cron job, add the following line to the command: >/dev/null 2>&1
  5. Click Add New Cron Job.

 

Viewing existing cron jobs

The Current Cron Jobs table displays the cron jobs you have already set up on the server.

From here, you may edit or delete a cron job.

 

Editing a cron job

To edit a cron job:

  1. Locate the cron job you wish to edit.
  2. Click Edit.
  3. Edit the settings you wish to change.
  4. Click Edit Line.

 

Deleting a cron job

To delete a cron job:

  1. Locate the cron job you wish to delete.
  2. Click Delete.
  3. Confirm that you wish to delete the cron job by clicking Delete again.
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Apache Handlers

Apache Handlers Apache handlers control how your site’s Apache web server software manages...

Image Manager

Image Manager cPanel includes 3 tools to help you manage the images you use on your website....

Index Manager

Index Manager When accessing a directory (rather than a page) on your site, a visitor will...

Error Pages

Error Pages An error page informs a visitor when there is a problem accessing your site. Each...

FrontPage® Extensions

FrontPage® Extensions FrontPage extensions will allow web pages to be published directly from...

Powered by WHMCompleteSolution