CF Schedule Issues

//CF Schedule Issues

I am trying to set up a ColdFusion schedule task on Linux, been having problems. Now I am trying to write the log, to see if the task was ran or not. If anybody can help, as my code does not write the output file 🙁

<!—scheduler.cfm—>

<cfset getDate = DateFormat(Now())>
<cfset getTime = TimeFormat(Now())>

<cfschedule action="update" 
			url="http://localhost/schedule/date.cfm" 
			task="CF Schedule Test" 
            operation="HTTPRequest" 
            interval="Daily" 
            startDate="#getDate#"
			startTime = "#getTime#"
			file="scheduletasklog">

<cflog log="scheduletasklog" text="It Ran!" file="/Applications/WebServer/Documents/schedule/output.cfm" >

<!— date.cfm—>


  <cfset tipdate = #CreateODBCDate(now())#>

<cfquery name="GetMembers">
  SELECT *
  FROM email_alerts
</cfquery>


<cfloop query="GetMembers">
  <cfmail To="#GetMembers.email_address#"
    From="johnbarr@hawaii.edu"
    Subject="CF Schedule Test"
    type="HTML">
		
	 <html>
		 <head>
		 </head>
		 <body>
		
	   	 	<cfoutput>
				Hello #GetMembers.name#<p>
				Today's date is <em>#DateFormat(tipdate, "mmmm d, yyyy")#</em><br />
	  		</cfoutput>
	
		 </body>
     </html>
  </cfmail>
</cfloop>

By | 2016-05-14T16:07:03+00:00 October 18th, 2012|ColdFusion|0 Comments

About the Author:

Leave A Comment