THE VIRTUAL SERVER HANDBOOK
Managing with Cron
 Cron enables you to schedule things to be done automatically. Cron is the
system scheduler for Unix. Using Cron, you can schedule events to occur
daily, weekly, monthly, hourly or whenever. Any command or set of
commands you can run from a Telnet prompt can be run from Cron. For
detailed information on Cron you can Telnet to your server and type "man 5
Crontab" at the command prompt. Much of the information in this section is
taken from the man (manual) page written by Paul Vixie.
Each Virtual Server can load its own Cron job to execute scheduled tasks.
The most effective way to use Cron is to load the scheduled tasks into the
Cron daemon from a file that you have created and stored on the Virtual
Server. Although it is possible to manipulate Cron directly, loading Cron
jobs from pre formatted files will ensure that you have a copy of the file
around for editing and for archival purposes. A common place to put such a
Cron file is in a directory called " Cronfiles" in your ~/etc directory.
To make the "Cronfiles" directory
1.
Connect to your Virtual Server via Telnet.
2.
Enter:
% cd ~/etc
% mkdir cronfiles
You can then store the file(s) holding your Cron information in this
directory. After you have made the Cron file, you need to load it into the
Cron program (daemon).
To load a file into the Cron program
1.
Change directories to where the file is located on your Virtual Server.
% cd ~/etc/cronfiles
If you have placed a Cron file in the directory named my_ cron_file, load
the file into the Cron program by typing:
% crontab my_cron_file
A copy of the Cron file you created is in memory in the Cron program. To
view Cron s copy in memory, you can call the Cron program with the "list"
option:
% crontab  l
Cron has other command line options such as "edit" and "remove". These
commands will allow you to manipulate the information that Cron has in
memory. For example, if you wanted to add another event to the Cron
information, you could use the Crontab  e option:
% crontab  e
This will take the copy of the entry that is stored in the Cron programs
memory, and allow you to edit it. This is however a less preferable option
than changing the physical file and re loading it into Cron because the
changes will not be physically stored anywhere accept in Cron's memory.
COPYRIGHT 
 1999  DIGITAL TOOLS  LLC.
57




  

Home

About Services Network Support FAQ Order Contact
 

Web Cam WebHosting

Our partners:Jsp Web Hosting Unlimited Web Hosting Cheapest Web Hosting  Java Web Hosting Web Templates Best Web Templates PHP Mysql Web Hosting Interland Web Hosting Cheap Web Hosting PHP Web Hosting Tomcat Web Hosting Quality Web Hosting Best Web Hosting  Mac Web Hosting 

Lunarwebhost.net  Business web hosting division of Vision Web Hosting Inc. All rights reserved