ColdFusionMX runs it's own scheduling service -- just like a mini crontab. Although the schedule service is managed through the CF Administrator, you can still use the CFSCHEDULE tag to UPDATE, DELETE & RUN schedules. But it seems a bit of an oversight that you can't actually programatically list the currently active scheduled tasks using CFSCHEDULE. Here's a little snippet of code to list SCHEDULED tasks outside of the Administrator.
Hunting about you'll find a little WDDX packet that holds all the relevant information you need -- for example, on my installation you'll find the crontab here: C:/CFusionMX/lib/neo-cron.xml. From there it doesn't take much to unwrap and play with the array you'll find inside.
Also, you might want to list the scheduled tasks for one specific application or other without giving access to the CF Administrator itself. You can see in the code snippet that I'm doing a little key matching for the "goog" string to pull only tasks related to fullasagoog.com -- where all Goog related tasks have the word "goog" in the taskname :)
Posted by modius at 10:52 PM | Permalink
Trackback: http://blog.daemon.com.au/cgi-bin/dmblog/mt-tb.cgi/86


What I am really interested in, is a way to determine success/failure of scheduled tasks.
If i could gleam it from a .xml or any other file, so as to be a part of my monitoring solution.
After all i have to monitor the success/failure of dts packages, it'd be nice if it was reasonably easy for cf scheduled tasks as well.
Posted by: Craig on July 30, 2003 05:44 AM
You can log the success or failure of scheduled tasks using the scheduler.log -- this is turned off by default. You turn the logging on through the CF Administrator logging setting panel.
Posted by: Geoff Bowers on July 30, 2003 08:20 AM