Overview

Cron jobs are automated tasks scheduled to run at predefined times or intervals. They are typically executed by the system using a script file, and they can perform a series of simple tasks.

It's important to exercise caution when scheduling cron jobs. Running them too frequently can hinder the usage of your LVE limits, and may lead to a breach of our fair usage policies. 

Add a cron email

The Cron Email feature allows you to receive notifications via email when your cron jobs run. To set up email notifications, follow these steps:

  1. Enter the email address where you want to receive the notifications in the Email text box.
  2. Click on the "Update Email" button to save the email address.

Disable email notifications

To disable email notifications for all cron jobs, simply remove the email address. If you want to disable email notifications for a specific cron job, follow these steps:

  1. Locate the cron job for which you want to disable email notifications.
  2. Find the relevant line in the cron job configuration.
  3. Add the following string to that line: [code] >/dev/null 2>&1[/code]
  4. Save your changes.

Add a cron job

To create a new cron job, follow these steps:

  1. Choose the desired interval for the cron job by selecting options from the available menus or by manually entering values in the text boxes.

    • Common Settings: This menu provides commonly used intervals and preconfigures the Minute, Hour, Day, Month, and Weekday fields. If you find the wildcard characters (*) and intervals confusing, this menu can help you understand how to configure the other fields.
    • Minute: Select the number of minutes between each time the cron job runs or specify the minute of each hour when you want it to run.
    • Hour: Select the number of hours between each time the cron job runs or specify the hour of each day when you want it to run.
    • Day: Select the number of days between each time the cron job runs or specify the day of the month when you want it to run.
    • Month: Select the number of months between each time the cron job runs or specify the month of the year when you want it to run.
    • Weekday: Select the days of the week when you want the cron job to run.
  2. In the Command text box, enter the command that you want the system to execute. Be sure to specify the absolute path to the command. For example, if you want to run the file public_html/index.php in your home directory, enter the following command: [code] /home/username/public_html/index.php[/code]

    Note: It is crucial to provide settings for all the required fields, including Minute, Hour, Day, Month, Weekday, and Command.

  3. Exercise extreme caution when using the rm command in a cron job. Without the correct options, you risk deleting important data from your home directory.

  4. Click the "Add New Cron Job" button to save the cron job.

View existing cron jobs

The "Current Cron Jobs" table displays all your existing cron jobs.

Edit a cron job

To make changes to a cron job, follow these steps:

  1. Locate the cron job you want to edit and click on the "Edit" button.
  2. Modify the settings as desired.
  3. Click the "Edit Line" button to save your changes.

Delete a cron job

To remove a cron job, follow these steps:

  1. Click on the "Delete" button next to the cron job you want to delete.
  2. Confirm the deletion by clicking "Delete."