SystemCommand cfm

 

 <cftry>
// use java utility SystemCommand which kills task properly after timeout
// and throw an Exception then
<cfset cmd = createObject("java","au.com.webcode.util.SystemCommand").init()>
<cfset command = "cmd.exe /C #mkvdk_exe_script# >> #resultLog# 2>&1">
<cfset envp = arraynew(1)>
<cfset timeoutAsAString = "3600000">
<cfset cwd = "F:\logfile\application\searchlog\mkvdk\doc\">
<cfset result = cmd.execute(command, envp, timeoutAsAString, cwd)>
<cfcatch>
<!--- ignore timeout and continue, to allow index the next batch --->
</cfcatch>
</cftry>