Skip navigation

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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.