CFSCHEDULE AND CFMAIL
Hello,
I am trying to use cfschedule with CFMail to send out a list of Work Orders due for the coming day.
I have it all working except when I try to query the db to get the list of work orders it seems to fail. When testing
I comment out the query and it works, however when I invoke the query it does not work.
Code:
<cfset StartTime = #DateAdd('n',1,Now())#>
<cfset StartTime = #TimeFormat(StartTime,'HH:MM:SS')#>
<cfset startdate ="#DateFormat(Now(),'MM/DD/YYYY')#">
<cfschedule action="Update"
task="testone"
operation="HTTPRequest"
url="http://www.mesllc.net/ems/cmms/admin/account/act_dailywo.cfm"
startdate="#startdate#"
starttime="#starttime#"
interval="ONCE"
resolveurl="Yes"
publish="No">
act_dailywo.cfm
<cfquery NAME = "gwo" DATASOURCE="#ODBC_DataSource#">
SELECT * from tblParkProfile;
</cfquery>
<CFMAIL FROM="mbloise@mesllc.net"
to="mikebloise@yahoo.com"
Subject = "Schedule with query"
server = "localhost">
Message:
</cfmail>
When I comment out the query it sends the email, however when I remove the comments it does not work.
Please note I changed the WO query to a simple select query. The query is correct.
I am using Coldfusion MX7 on a shared server.
Thanks for the help.
Mike
