Helping ordinary people create extraordinary websites!
HOME TUTORIALS SCRIPTS WEB HOSTING BLOG FORUM
Get Our Newsletter
Email:

Cron

By Will Bontrager
2004-01-09


Cron

Cron is a Unix/Linux program scheduler. It'll automatically execute commands on your server according to a schedule you specify.

A few of the many uses for scheduled commands are:

~~ Email WillMaster Possibilites ezine at 12:08 GMT
every Tuesday.

~~ Do automatic database updates at night when the
server is less busy.

~~ Send a robot to select sites for verifying certain
links are present.

~~ Send a weekly report to you about how much server
space you're using.

Almost anything that needs to be done according to a schedule and that doesn't need direct human supervision can be set up with Unix/Linux cron.

Note: Some hosting companies don't give their accounts
telnet or SSH (a secure telnet-like connection) access
to the server. A few, in lieu of such access, provide
a control panel to set up cron schedules. Others do
not provide cron scheduling at all.

To create a cron schedule, put a list of commands and their schedules in a plain text file. This text file is called the "cron table." Upload the cron table to your server. Then telnet or SSH to your server.

Once at your server, type

crontab filename

replacing "filename" with the file name of the cron table you uploaded to your server. This will register your cron table with the cron system.

If you want to verify that the cron system has indeed registered your cron table, type

crontab -l

(the letter el, not the number 1). That will display a list of the current registered cron schedules.

Tutorial Pages:
» Cron
» The Cron Table
» The Five Schedule Time Fields
» Hypothetical Situations
» The Hypothetical Situations Schedules
» The Sixth Field, The Command
» On-line Documentation for cron and crontab
» A Practice Script
» Conclusion


Copyright 2004 Bontrager Connection, LLC


 | Bookmark
Related Tutorials:
» How to Install PHP 5 on Linux
» How to Install Apache 2 on Linux
» How to Install MySQL 5.0 on Linux
» SMB Caching
» Mound --Bind
» Tar Wild Card Interpretation