ColdFusion中的自定义标签超时错误



我有一个调用页(abc.cfm),作为一个任务安排。它有一个自定义的标签调用cfhttp调用和刮擦网站。现在,由于请求超时问题,作业失败了。我正在尝试围绕自定义标记调用做<cftry> <cfcatch>,如下所示。

在超时时,我需要重新安排这项工作。我已经创建了一个无法访问的url =http://www.google.com:81/的测试目标。因此,自定义标记将击中此页面并超时。但是,我没有看到在cfadmin中创建计划任务。我还遗漏了什么吗?

<cftry>    
  <cf_main-test target_id="#thistid#" crawl_id="#crawl_id#" fullrunmode=false>
  <cfcatch type="any"> 
    <cfset tock = GetTickCount()>
    <cfset time = tock-tick>
    <cfschedule 
      url="http://10.0.0.100/engine/testauto.cfm?task=yes&LastTaskID=#taskID#&nexttid=#thistid#" 
      action="update" 
      task="process item #TaskID#" 
      operation="httprequest"
      startdate="#DateFormat(Now(),'mm/dd/yyyy')#" 
      starttime="#TimeFormat(DateAdd('n', 1, Now()),'hh:mm:ss tt')#"
      interval="once">

  </cfcatch>
</cftry>

示例CFHTTP调用:

<CFHTTP url="#pagetoscrape#" method="GET" path="#savepath#" file="#savedfilename#" resolveurl="#resolveurl#" useragent="User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)#Chr(13)##Chr(10)#Accept: */*#Chr(13)##Chr(10)#Cookie: #lwwcookie#" timeout="20">
<cfsetting requesttimeout="900" />

放到标签里。使用页面请求超时(仅针对该页)

最新更新