I found this code helpful while working with schedule tasks(i’ve been working with it for a while now ;-)).
Schedule tasks that are created in the Coldfusion Administrator can be accessed as structure programatically. This is particularly in need when we need to check through code whether a schedule task has been executed or not. We can also get the details of the existing schedule tasks that are in the Coldfusion administrator.
<!--- Get the scheduler xml file. It's stored as WDDX in CFroot dir---> <cffile action="Read" file="#Server.ColdFusion.RootDir#/lib/neo-cron.xml" variable="TaskXML"> <!--- Convert the WDDX to CFML - and array of structs ---> <cfwddx action="WDDX2CFML" input="#TaskXML#" output="GetTasks"> <!--- Dump all the schedule tasks in CF Admin in Struct format. ---> <cfdump var="#GetTasks#">
The Scheduler configuration file neo-cron.xml stores all the schedule task details in the CF Admin in xml format. We are simply reading the file and converting the WDDX into an array of structs.
The output should look something like this: