 |
|
|
|
| |
|
|
 |
| |
|
|
| |
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
- This tutorial assumes that you've already logged into
SiteWorx and you're on the SiteWorx Overview page. Your
screen should look like this:
- In order to setup a Cron job, you need to click on
the 'Cron Jobs' button in the Left Control Panel Menu.
- You should now be on the Cron Job page.
- 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
- 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:
- 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.
- 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.

Advanced Interface
If you'd like to use the advanced interface, click the
'Switch to advanced interface' link.
- You should now be on the main advanced interface page.
- Enter the path to your script in the 'Script' field.
For an example, see step #4.
- 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,*,*,*.
- Click the 'Add' button to add your cron job. You should
now see your cron job in the list at the bottom.
- 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.
Back to tutorials
page
|