A Few of My Favorite Things from ColdFusion 10: The All-New Scheduler

Posted 15 May 2012

Now that ColdFusion 10 has been officially released, I’d like to take some time to talk about some of the new features that I find to be real productivity enhancers and features that open new possibilities for work. I’m not going to discuss how the features work (i.e.; the code) because there are a lot of great resources one Google search away that show you how to do that (and there’s the always-underutilized ColdFusion docs!). If you just want to see the list of new functions in ColdFusion 10, you can also check out this page from the ColdFusion 10 docs.

Although ColdFusion 10 has a lot of new features, one of my personal favorites is the all-new scheduler. My team relies heavily on scheduled tasks for the work that we do. In versions of ColdFusion prior to CF10, you had very limited control over the running of a scheduled task. If something went wrong in the scheduled task, you had to handle the errors in a pretty non-graceful way: try/catch blocks with an email message to the developers letting you know things had bombed out, or another scheduled task to check a log file to ensure that the scheduled task ran. If you wanted fine-grained control over the running of scheduled tasks (i.e.; run this task every Tuesday and Thursday at 3am), you’d have to write custom logic in your scheduled task to handle this because the timing options were somewhat limited. If you wanted to have one task chain into another to ensure a sequence of events, you’d have to write everything as a single task and chain things together in that single task (which, again, could fail and then you’d have to handle the failure for multiple parts and not just one).\r\n\r\nColdFusion 10 incorporates the pretty awesome Quartz Scheduler and makes using scheduled tasks a whole lot more powerful. Again, if you want to see the code and all the feature options, you can check out the ColdFusion 10 docs for <cfschedule>. Here’s a recap of what I find to be so useful about the new scheduler:

There’s a lot more to the all-new scheduler in ColdFusion 10 (groups, app-specific scheduled tasks, repeat options, priority scheduling), but these three features, I think, have the biggest implications for changing how you use scheduled tasks in ColdFusion. I find them to be a very welcome addition to ColdFusion 10, and hope you do too!

Categories: ColdFusion