Day 11: ColdFusion and Schedule Task Enhancement

Schedule task is something that I used lot and specially one of our clients love to get email periodically for different reports. In many case we get limited with ColdFusion 9 schedule task, like for one of schedule task require to reschedule on different time once executed and time vary per database transaction. Following are list of new feature in schedule task.

  • Quartz Scheduling Service : Quartz is full feature, open source job scheduling service. I overview documentation and looks nice scheduling service with numerous functionality. So we will all these best feature with ColdFusion schedule task.
  • Grouping : We can group schedule task so later can be perform resume/pause on all group task instead of individual. Look nice feature when you large number of schedule task to run on server.
  • Application Specific Task: Now schedule task can be implemented at Application level so it is visible at application level instead of server.
  • Event Handling : I think this one is feature that I love most. You can setup your own event handler for your schedule and which has CFC containing different handling function. Support following events,
    •  onTaskEnd : 
    • onTaskStart
    • onError
    • execute
      Event handler should extend CFIDE.scheduler.ITaskEventHandler.cfc
  • Chaining : Really nice feature added, automatically call another task once parent task completed.
  • Cluster : you can run scheduler in cluster setup. It seems that creating database table to store all scheduling related data. Do I need to say that time of all cluster system should be same?
  • Cron Command : Now you can use cron command to schedule file.
  • Prioritize task: You can give priority to task in case you have big amount of task running at same time and limited worker thread.
  • Exclude dates: I love this one. Skip schedule file on specific date or date range. Normally this I was doing at coding level in schedule file.
  • In case of error: It will allow you to perform another operation on schedule file generate error.
  • If task misfire : Misfire occurs if schedule file doesn’t executed on specific time due to scheduler stop or thread not available to run it and in this case you perform another operation on it.
  • Pause, Resume / Pause all and Resume All : This will allow to pause or resume individual or at group level.
  • List task : Previously I was using Java tweak to list out all task but it good that coldfusion support that.
  • Retry : In case of exception we can preset to continue re-firing up to specific number of count.
  • Repeat : Specify number of time schedule has to be repeat. Good, Now I do not write update schedule code in schedule file itself.
  • Customized Quartz: As scheduler built on quartz definitely it will let you customize it.