Hi Blair,
Thanks for the reply. That was why I removed super. as it does
overwrite my setData.
I pretty much had followed your steps: copied the core dmCron and
changed the extend value. Here is a copy of my dmCron (which doesn't
work).
Cheers
Mark
<cfcomponent extends="farcry.core.packages.types.dmCron">
<!------------------------------------------------------------------------
type properties
-------------------------------------------------------------------------
>
<!--- first overwrite properties from the core --->
<cfproperty name="frequency" ftlist="Once:Run once,Daily:Every
day,Weekly:Every week,Monthly:Every month,3600:Every hour,1800:Every
half-hour,900:Every 15 minutes,300:Every 5 minutes,60:Every minute">
<cfproperty
name="timeout" type="numeric" hint="Time out period in seconds"
required="no" default="60"
ftseq="37" ftfieldset="Settings" title="Timeout (sec)"
ftlabel="Timeout (sec)"
fthint="Timeout in seconds">
<!--- additional properties to be added --->
<cfproperty
name="username" type="string" hint="User Name to use if URL is
secured" required="no" default=""
ftseq="30" ftfieldset="Settings" ftlabel="User Name">
<cfproperty
name="password" type="string" hint="Password to use if URL is
secured" required="no" default=""
ftseq="35" ftfieldset="Settings" ftlabel="Password">
<cfproperty
name="proxyserver" type="string" hint="Proxy Server" required="no"
default=""
ftseq="40" ftfieldset="Settings" ftlabel="Proxy Server">
<cfproperty
name="proxyport" type="integer" hint="Proxy Port" required="no"
default="80"
ftseq="45" ftfieldset="Settings" ftlabel="Proxy Port">
<cfproperty
name="publish" type="boolean" hint="Save output to a file"
required="no" default=""
ftseq="50" ftfieldset="Settings" ftlabel="Publish"
fthint="Save output to a file">
<cfproperty
name="filename" type="string" hint="File to save output to"
required="no" default=""
ftseq="55" ftfieldset="Settings" ftlabel="File"
fthint="File to save output to, include full path">
<cfproperty
name="resolveurl" type="boolean" hint="Resolve internal URLs so that
links remain intact" required="no" default=""
ftseq="65" ftfieldset="Settings" ftlabel="Resolve URL"
fthint="Resolve internal URLs so that links remain intact">
<cffunction name="setData" access="public" output="true" hint="Creates
a scheduled task and actual dmCron object">
<cfargument name="stProperties" required="true">
<cfargument name="user" type="string" required="true" hint="Username
for object creator" default="">
<cfargument name="auditNote" type="string" required="true" hint="Note
for audit trail" default="Updated">
<cfargument name="bAudit" type="boolean" required="No" default="1"
hint="Pass in 0 if you wish no audit to take place">
<cfargument name="dsn" required="No" default="#application.dsn#">
<cfargument name="bSessionOnly" type="boolean" required="false"
default="false"><!--- This property allows you to save the changes to
the Temporary Object Store for the life of the current session. --->
<cfargument name="bAfterSave" type="boolean" required="false"
default="true" hint="This allows the developer to skip running the
types afterSave function.">
<cfset var stReturn=structNew() />
<cfif not arguments.bSessionOnly and
structKeyExists(arguments.stProperties,"title")>
<!--- check if task has been renamed --->
<cfset stExistingObj = getData(arguments.stProperties.objectid)>
<cfif stExistingObj.title neq arguments.stProperties.title>
<cftry>
<!--- delete old task --->
<cfschedule action="Delete" task =
"#application.applicationName#_#stExistingObj.title#">
<cfcatch></cfcatch>
</cftry>
</cfif>
<!--- add/update task --->
<cfschedule
action="UPDATE"
task =
"#application.applicationName#_#arguments.stProperties.title#"
operation = "HTTPRequest"
url = "http://#cgi.HTTP_HOST##application.url.conjurer#?
objectid=#arguments.stProperties.objectid#&#arguments.stProperties.parameters#"
interval = "#arguments.stProperties.frequency#"
startdate =
"#dateFormat(arguments.stProperties.startDate,'dd/mmm/
yyyy')#"
starttime =
"#timeFormat(arguments.stProperties.startDate,'hh:mm
tt')#"
enddate =
"#dateFormat(arguments.stProperties.endDate,'dd/mmm/
yyyy')#"
requesttimeout = "#arguments.stProperties.timeout#"
proxyserver = "#arguments.stProperties.proxyserver#"
proxyport = "#arguments.stProperties.proxyport#"
username = "#arguments.stProperties.username#"
password = "#arguments.stProperties.password#">
</cfif>
<!--- <cfreturn
setData(arguments.stProperties,arguments.user,arguments.auditNote,arguments.bAudit,arguments.dsn,arguments.bSessionOnly,arguments.bAfterSave)
/
>--->
<cfset
stReturn=application.fapi.setData(stProperties=arguments.stProperties,user=arguments.user,auditNote=arguments.auditNote)>
<cfreturn stReturn />
</cffunction>
</cfcomponent>
--
You received this message cos you are subscribed to "farcry-dev" Google group.
To post, email: [email protected]
To unsubscribe, email: [email protected]
For more options: http://groups.google.com/group/farcry-dev
--------------------------------
Follow us on Twitter: http://twitter.com/farcry