Permalink
Browse files

Scheduled task now based on config title value. Directory now derived…

… instead of hard coded
  • Loading branch information...
1 parent 40d3748 commit b962ec9b526136dab923610b78be51c984b14ae7 @rarneson committed Sep 22, 2011
Showing with 11 additions and 4 deletions.
  1. +1 −0 .gitignore
  2. +10 −4 app/util/ExporterUtil.cfc
View
@@ -0,0 +1 @@
+temp/
View
@@ -13,10 +13,12 @@
</cffunction>
<cffunction name="schedule" access="public" returntype="void" output="false" events="applicationStart">
-
+
+ <cfset local.title = $.config.get('title') />
+
<cfschedule
action="update"
- task="Purge NCFPD Research Database Exports"
+ task="Purge #local.title# Exports"
startDate="#now()#"
startTime="#now()#"
interval="daily"
@@ -26,9 +28,13 @@
</cffunction>
<cffunction name="getPath" access="public" returntype="string" output="false">
-
+
+ <cfset local.pluginPath = expandPath(getCurrentTemplatePath()) />
+ <cfset local.length = listLen(local.pluginPath, '/') />
+ <cfset local.dir = listGetAt(local.pluginPath, local.length-3, '/') />
+
<!--- set our folder path for the export destination --->
- <cfreturn expandPath("/plugins/exporter/temp/") />
+ <cfreturn expandPath("/plugins/" & local.dir & "/temp/") />
</cffunction>

0 comments on commit b962ec9

Please sign in to comment.