How to get the list of tasks running in coldfusion server
To get the list of tasks which are running on the server, we can use the following code:
<cfobject type="JAVA" action="Create" name="factory" class="coldfusion.server.ServiceFactory">
<cfset ListOfTasks = factory.CronService.listAll()/>
<cfloop index="i" from="1" to="#ArrayLen(ListOfTasks)#">
<cfdump var="#ListOfTasks[i]#" />
</cfloop>
<cfobject type="JAVA" action="Create" name="factory" class="coldfusion.server.ServiceFactory">
<cfset ListOfTasks = factory.CronService.listAll()/>
<cfloop index="i" from="1" to="#ArrayLen(ListOfTasks)#">
<cfdump var="#ListOfTasks[i]#" />
</cfloop>
Comments
Post a Comment