Skip to Main Content
Programming ColdFusion MX, 2nd Edition
book

Programming ColdFusion MX, 2nd Edition

by Rob Brooks-Bilson
August 2003
Intermediate to advanced content levelIntermediate to advanced
1140 pages
68h 45m
English
O'Reilly Media, Inc.
Content preview from Programming ColdFusion MX, 2nd Edition

Additional Considerations

As useful as the ColdFusion Scheduler is, it does have its limitations. One of the most notable limitations of the Scheduler is that there is no built-in redundancy. That is, if a scheduled task fails to execute for whatever reason (say the server is down) the Scheduler has no way of knowing this condition and only attempts to execute the task again the next time it is scheduled for execution.

It is possible to build redundancy into your scheduled tasks, but it takes work. One solution involves creating a small database that contains a record for each entry in the Scheduler. Each time you execute a scheduled task, you cfinclude a file or call a custom tag that updates a field in the database with the time and date that the task should be executed next. A second template scans the database of scheduled tasks and checks to make sure none of the tasks have a time/date for next execution that is older than the current time/date. If so, you know that the task didn’t execute for some reason, and you can call the cfschedule tag to immediately try to run that task again. The template that performs the scan should itself be scheduled to run at an interval that is appropriate for your particular needs (i.e., every 15 minutes, every 30 minutes, etc.).

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Programming ColdFusion

Programming ColdFusion

Rob Brooks-Bilson

Publisher Resources

ISBN: 0596003803Supplemental ContentErrata Page