Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

… instead of hard coded
  • Loading branch information...
commit b962ec9b526136dab923610b78be51c984b14ae7 1 parent 40d3748
Ryan Arneson authored September 22, 2011
1  .gitignore
... ...
@@ -0,0 +1 @@
  1
+temp/
14  app/util/ExporterUtil.cfc
@@ -13,10 +13,12 @@
13 13
     </cffunction>    
14 14
 	
15 15
 	<cffunction name="schedule" access="public" returntype="void" output="false" events="applicationStart">
16  
-    	
  16
+
  17
+    	<cfset  local.title = $.config.get('title') />
  18
+
17 19
 		<cfschedule 
18 20
 			action="update"
19  
-			task="Purge NCFPD Research Database Exports"
  21
+			task="Purge #local.title# Exports"
20 22
 			startDate="#now()#"
21 23
 			startTime="#now()#"
22 24
 			interval="daily"
@@ -26,9 +28,13 @@
26 28
     </cffunction>
27 29
 	
28 30
 	<cffunction name="getPath" access="public" returntype="string" output="false">
29  
-    	
  31
+        
  32
+    	<cfset local.pluginPath = expandPath(getCurrentTemplatePath()) />
  33
+    	<cfset local.length = listLen(local.pluginPath, '/') />
  34
+    	<cfset local.dir = listGetAt(local.pluginPath, local.length-3, '/') />
  35
+
30 36
 		<!--- set our folder path for the export destination --->
31  
-		<cfreturn expandPath("/plugins/exporter/temp/") />
  37
+		<cfreturn expandPath("/plugins/" & local.dir & "/temp/") />
32 38
 	
33 39
     </cffunction>
34 40
 	

0 notes on commit b962ec9

Please sign in to comment.
Something went wrong with that request. Please try again.