Contact Us!
Search indigo8
  indigo8 Home
Home
 
Services
 
Hosting
 

  SiteWorx Cron Tutorial

Cron is a daemon that runs in the background of the *nix environment to carry out specific tasks at a certain date and time. You should think of Cron as a scheduled task. Once you setup the script, and time interval in which you'd like to run the script, Cron will run your script at that time.

Setting up a Cron Job

  1. This tutorial assumes that you've already logged into SiteWorx and you're on the SiteWorx Overview page. Your screen should look like this:

    SiteWorx Site Overview

  2. In order to setup a Cron job, you need to click on the 'Cron Jobs' button in the Left Control Panel Menu.

    Cron Job button

  3. You should now be on the Cron Job page.

    Main cron job page

  4. From here you have the choice of using the standard interface or the advanced interface. First we'll look at the standard interface. In the 'Script' field, you need to enter the PATH to the script you'd like to use. For example, if you have a script in the cgi-bin called 'myscript.cgi', your path would be '/home/yourdomain.com/html/cgi-bin/myscript.cgi'. Enter your script path in the 'Script' field.


Standard Interface

Script field

  1. Now you need to set the interval that you'd like your script to run on. For instance, if you're script clears your log files and you'd like to have them cleared at midnight every day and every month, you'd set the interval as follows:

    Setting cron interval

  2. Once you've set the interval, click the 'Add' button. This will add the Cron Job to the list of tasks to run. You should now see your cron job in the list below.

    Add your cron job

    View your cron job

  3. You now have a cron job that will run over and over again at your interval until you remove it. 1.) If you'd like to change the interval, click the 'Edit' button next to your cron job and enter your new interval. 2.) If you'd like to delete your cron job, click the 'Delete' button to remove your cron job. 3.) If you have more than one cron job and you'd like to remove them all at the same time, click the 'Delete All' button.

    Editing and deleting your cron job


Advanced Interface

If you'd like to use the advanced interface, click the 'Switch to advanced interface' link.

Advanced interface link

  1. You should now be on the main advanced interface page.

    Main advanced interface page

  2. Enter the path to your script in the 'Script' field. For an example, see step #4.

    Path to your script

  3. Now you need to setup your interval. If you'd like to run your script at midnight every day and every month, enter the interval as 0,0,*,*,*.

    Cron interval

  4. Click the 'Add' button to add your cron job. You should now see your cron job in the list at the bottom.

    Add your cron job

    View your cron job

  5. You now have a cron job that will run over and over again at your interval until you remove it. 1.) If you'd like to change the interval, click the 'Edit' button next to your cron job and enter your new interval. 2.) If you'd like to delete your cron job, click the 'Delete' button to remove your cron job. 3.) If you have more than one cron job and you'd like to remove them all at the same time, click the 'Delete All' button.

    Editing and deleting your cron job

Back to tutorials page

 

928-526-3559 Contact Us 888-318-9915
Copyright © 1998 indigo8 Internet, Inc.
177 West Gold Rush Trail
Flagstaff, Arizona 86001