Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to call a function later at a scheduled time in ColdFusion?

<cfschedule> can only call an URL.

What can I use to call a function with some dynamic parameters later?

the only way I can think of is to call it the GET way with and populate the parameters in url scope:

./someAction.cfm?param1=xx&param2=yy

However, this doesn't work for me 'cause I will likely hit the GET limit for large, complex data.

Do I need to implement my own scheduler to call a function?

or... is there any simpler solution in CFML? if not, maybe something in J2EE?

Thanks.

like image 989
Henry Avatar asked Feb 28 '23 09:02

Henry


2 Answers

You could set something up to write your parameters to a local file or even a database, then your scheduled task could read the information from there, do its thing, then delete the parameters.

like image 88
ale Avatar answered Apr 08 '23 19:04

ale


You could fire off cfthread to do the processing, however if the activity is far in the future this would not work well.

like image 20
Pete Freitag Avatar answered Apr 08 '23 18:04

Pete Freitag