
Cron
Job Manager
Unix uses a utility called cron
to run user-created scripts at certain intervals. Crons can be
invaluable for performing regular tasks associated with your website.
For example, you could write a script that backs-up your MySQL
database, then run it every Sunday at 2 a.m., or you could write a
script to email invoices to all of your clients, and set it to run
daily at 5 p.m.
Cron
Job Manager is designed to make scheduling cron processing
simple and painless. By default, the run-time of each entry in the
Cron Job Manager will be displayed in an easy-to-read format. However,
when the scheduling particulars are complex, the entry may only be
viewable in Advanced mode. When viewing the entries in Advanced mode,
you will see exactly how they are formatted to be read with Cron.
Note: This
chapter explains how to use the Cron Job Manager to schedule cron
jobs; it does not provide instructions on how to author the scripts
you can run.
To access the
Cron Job Manager:
Click the Cron
Manager icon in your Control Panel.
Using Cron Job
Manager
To add a cron
job:
-
Click on Add
New Entry.
-
A form will
be displayed with the following fields:
-
Command
a unix command containing detailed instructions for the
cron.
-
Description
a brief description of what the job does.
-
Suspended
option to suspend the cron job, that is, save it, but manual
disable it.
-
Use the
time intervals to determine when the job will run.
-
Click Apply
and the cron job will be enabled.
Cron Job
Manager allows you to set up jobs you manage through your email. The
output and completion status can be sent to an email address that you
specify.
To specify the
email address to which the results of your cron job will be mailed:
-
If you have
not already entered an address, click the No Address Specified
link. Otherwise, click the email address that displays to change
it.
-
Enter your
email address when prompted.
-
Click Apply.
To run a cron
job in advanced mode:
Click on Change
to Advanced Format.
Changing to the
advanced mode shows you the run times in code rather than the times
shown in the simple mode.
To cancel a
cron job:
In both the
simple and advanced modes, you may cancel a cron job by clicking the X
under Enabled. This will bring up a confirmation page. Click Remove
and the entry will be deleted.