Nothing too difficult about CF schedule, just point it to a page that runs normally. I see your url is under /admin. If you have security built in to application.cfm of that directory, you won't be able to get in with your scheduled tag as far as I know. I had to do something like this with cfschedule, so I made another directory under admin, call it "schedule" and only would run the template with a password in the url variable, so your scheduled tag url might look like this. http://www.mydomain.com/admin/email/scheduler/test_email_process.cfm?accesscode=OIEiorJD833Ksjd Nothing is output in the template, so great security is not really necessary. Just run your report output within cfmail tags. Also keep in mind it won't work in https mode.
Chris > Any good tutorials on this subject - all I've seen in numerous books is > examples of running reports at determined intervals. What I want to do is > run a template which contains a query and then outputs the results to > CFMAIL. Can I do this using CFSchedule, or is there a better way? > > Here's what I have now, and it won't work (I'm on a shared server with no > access to the CF Admin functions): > > Any assistance or suggestions is/are appreciated. > > Thanks, > Mark > > ----------------------------- > <!---Scheduler Template---> > <CFSCHEDULE ACTION="UPDATE" > TASK="TestMessage" > OPERATION="HTTPRequest" > URL="http://www.mydomain.com/admin/email/scheduler/test_email_process.cfm" > STARTDATE="01/24/02" > STARTTIME="06:45:00" > INTERVAL="DAILY" > RESOLVEURL="No" > PUBLISH="No"> > </cfschedule> > > ---------------------------- > <!---Query/Email Sendout Template---> > <CFQUERY NAME="q_sub" > DATASOURCE="uspc"> > SELECT * > FROM t_email, t_msg, t_sig, t_subcat, t_unsub_msg > WHERE t_email.subcat_h = t_msg.t_subcat_ID AND t_msg.t_subcat_ID = > t_subcat.sc_id AND t_msg.dateofsend = DateValue(Now()) > </CFQUERY> > > <CFIF q_sub.recordcount IS 0><cfabort></cfif> > > <!--- Send out mail to the specified group---> > <CFMAIL QUERY="q_sub" > GROUP = "email" > GROUPCASESENSITIVE="No" > STARTROW="1" > TO="""#firstname# #lastname#"" <#email#>" > FROM="""John Doe"" <[EMAIL PROTECTED]>" > SUBJECT="#msg_subject#" > CC="#copy_to#" > BCC="#blind_copy_to#" > SERVER="127.0.0.1"> > <cfmailparam name="Reply-To" value="""John Doe"" > <[EMAIL PROTECTED]>"> > <cfif q_sub.vit_ID NEQ 0>#trim(thought)# --#trim(author)##crlf##crlf#</cfif> > <cfif q_sub.txtmessage IS NOT "">#Trim(txtmessage)##crlf##crlf#</cfif> > <cfif unsublink IS "Yes">#trim(unsub_msg)##crlf##crlf#</cfif> > <cfif msg_sig IS "Yes">#trim(sig_line)#</cfif> > </CFMAIL> > > <!---Send a confirming Email to Mydomain.com indicating that the > messages have been delivered.---> > > > <!---Do not suppress whitespace in the email message---> > <CFPROCESSINGDIRECTIVE SUPPRESSWHITESPACE="No"> > > <CFMAIL > TO="""John Doe"" <[EMAIL PROTECTED]>" > FROM="""John Doe"" <[EMAIL PROTECTED]>" > SUBJECT="Email Message Center Delivery Success" > SERVER="127.0.0.1"> > As of #LSDateFormat(Now(), "mmmm dd, yyyy")# #LSTimeformat(Now(), > "hh:mm:ss")#, #q_sub.recordcount# subscribers have been provided a > #q_sub.sub_category# message via automated email. > > END OF MESSAGE > > </CFMAIL> > > </CFPROCESSINGDIRECTIVE> > > <cfabort> > ______________________________________________________________________ Get Your Own Dedicated Windows 2000 Server PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation � $99/Month � Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusionb FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

