开发者

Coldbox and cfschedule

开发者 https://www.devze.com 2023-01-04 08:31 出处:网络
How should I add a cfschedule task to an app using the Coldbox framework? Should I: a.) write an event that does what the task, and point cfsch开发者_开发问答edule to that URL with Coldbox?

How should I add a cfschedule task to an app using the Coldbox framework?

Should I:

a.) write an event that does what the task, and point cfsch开发者_开发问答edule to that URL with Coldbox?

b.) write a simple .cfm outside of coldbox?

Is one better than the other?

Thanks.


I agree, choose A, it gives you the entire lifecycle, access to logging, ses, etc.


I chose to use ColdBox event instead, so I can take advantage of using ioc plugin without accessing ColdSpring directly from the application scope.


I think it really depends on how closely aligned the scheduled task is with your core functions.

If ColdBox will allow you to re-use parts of the site already running, or if it will provide better protection against change problems later, by all means use it. This is probably the correct answer 90% of the time.

However, if you want to do something tangentially related, like email and archive your IIS/Apache logs, then I don't think it makes sense to integrate the two.

0

精彩评论

暂无评论...
验证码 换一张
取 消