Managing Cron jobs

RSS

Managing Cron jobs

Last updated September 13th, 2010

Cron is a tool that schedules commands or shell scripts to run automatically at a particular time interval. For example, you may want to perform some maintenance by running a script every night at midnight.

Step by Step - Adding a Cron Job

Follow these steps to add a cron job:

  1. Click "All Website servers".

  2. Click the server which you want to add the cron job to.

  3. Click "Cron jobs"

  4. Click "Add". See Figure 1.

  5. Choose the frequency of how often the command will be run, the command to run, and the output options.

    The frequency can be selected from the drop-down list, or clicking the "Show advanced" button gives access to the minute/hour/day/month/day of week fields that will be passed to cron.

    Command specifies the command you wish the cron job to execute. An example of this might be: /usr/bin/php -f /home/www/mysitehostaccount/website.example.com/file.php

    The output options 2>&1>, > and >> are the standard Unix redirection operators, and mean the following:

    • 2>&1> : All output will be stored to the file
    • > : All standard output will be stored to the file
    • >> : All standard output will be appended to the file
  6. Click "Add cron job". See Figure 2.

Step by Step - Removing a Cron Job

Follow these steps to remove a cron job:

  1. Click "All Website servers".

  2. Click the server which has the website that you want to remove the cron job from.

  3. Click "Cron jobs"

  4. Click the red X next to the cron job you want to delete. See Figure 3.

  5. Click the "Delete cron job" button to cofirm and apply. See Figure 4.

Figure 1

Add cron job

Figure 2

Add cron job

Figure 3

Delete cron job

Figure 4

Delete cron job


Next: Accessing your Website Statistics →

Can we improve this article? Suggest an improvement to this article.

Suggest an Improvement

Thank you for helping us to improve this Knowledge Base article. Please type your suggestions below:

Still need help? Get in touch with us.

If you aren't able to find the help you need then please send us a question and we can help you further.