I find it really frustrating sometimes trying to investigate why a schedule task is not executing correctly on a production server because we don’t get access to the CF admin and inspect each schedule task for ourselves. BUT luckily I’ve found this little snippet of code which gonna make our lives much brighter.
<cfset factory = createObject('java', 'coldfusion.server.ServiceFactory')>
<cfset allTasks = factory.CronService.listAll()/>
<cfloop index="i" from="1" to="#ArrayLen(allTasks)#">
<cfdump var="#allTasks[i]#" />
</cfloop>
This script basically returns a list of schedule tasks on the server!
Advertisement