I want to find out the details of scheduled tasks running on 5 or 6 coldfusion web-servers, by just writing a single page on one of them. Is there any way to do it? It might be done by reading cron.xml on all of them.
I came across with following code
<cflock name="alltasks" type="exclusive" timeout="10">
<cfscript>
factory = CreateObject("java","coldfusion.server.ServiceFactory");
cron_service = factory.CronService;
services = cron_service.listALL();
</cfscript>
This code is good for finding out details for web server on which it will be executed.
I am looking for something similar to this, that will get me details of scheduled tasks running on all web-servers in same network. Thanks!!
You could use the cfschedule tag, and place a page on each server that outputs the scheduled tasks for that machine. You could then use an HTTP request to each server to pick up the tasks it's responsible for and output them to the page on your monitoring server.