Alternative Scheduling Options


Most operating systems have mechanisms for scheduling the periodic execution of tasks. You can execute ColdFusion from the command line by calling the server executable and passing the location of the template to be executed.

Windows use the at command. at can be used to list existing commands in the schedule or to schedule commands and programs to run on a computer at a specified time and date. The Windows Schedule service must be running to use at.

Unix uses a handy little utility called Cron, which is controlled by a set of files called crontabs. A master file is stored in the /etc/crontab directory, along with crontab files for individual users in /var/spool/cron/.

crontab filename will install the file you specify as a new crontab. The crontab command has some other switches that list, edit, and remove crontabs, but the basic syntax is all you need. If you want to edit the crontab, you simply reinstall the file with a new crontab command.

NOTE

For more information, run man cron and man crontab for your particular flavor of Unix.




Macromedia ColdFusion MX 7 Certified Developer Study Guide
Macromedia ColdFusion MX 7 Certified Developer Study Guide
ISBN: 0321330110
EAN: 2147483647
Year: 2004
Pages: 389
Authors: Ben Forta

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net