Today I needed to view the details for all the scheduled tasks on one of our client’s servers. I needed a print out showing the tasks including the URL, the schedule and whether the task was disabled or not. There were quite a few tasks on this machine, and I wasn’t looking forward to manually going into each task, printing it, and then ending up with a huge stack of printed pages.

So instead I wrote this short script that displays the information I need all in one page.

<cfset fileContents = FileRead("/opt/coldfusion8/lib/neo-cron.xml")>

<cfwddx action="wddx2cfml" input="#fileContents#" output="tmp">

<cfloop collection="#tmp[1]#" item="task">
	<cfoutput>
	<cfset taskDetails = tmp[1][task]>
	<p <cfif taskDetails.disabled OR taskDetails.paused>style="color: grey;"</cfif>>
	#task#
	<cfif taskDetails.disabled OR taskDetails.paused> (disabled/paused)</cfif><br />
	URL: #taskDetails.URL#<br />
	<cfif Len(taskDetails.file)>Result File: #taskDetails.path#/#taskDetails.file#<br /></cfif>
	Time: #taskDetails.start_time#<br />
	Interval: #taskDetails.interval#
	</p>
	</cfoutput>
</cfloop>