EasyCFM.COM ColdFusion Forums / Coding Help! / schedule

   Reply to Discussion | New Discussion << previous || next >> 
Posted By Discussion Topic: schedule

book mark this topic Printer-friendly Version  send this discussion to a friend  new posts last

johnbarrett
10-18-2012 @ 6:38 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Member
Posts:
Joined: Oct 2012

I have a cfschedule that queries the database and sends a e-mail to
everybody in the database. I need to create an output file to show whether
the cfschedule was fired or not.

Can anybody help me?
Here is my code so far
<cfset getDate = DateFormat(Now())>
<cfset getTime = TimeFormat(Now())>

<cfschedule action="update"
               url="http://localhost/schedule/get_tips.cfm"
               task="DalyTips"
            operation="HTTPRequest"
            interval="Daily"
            startDate="#getDate#"
               startTime = "#getTime#"
               oncomplete="http://localhost/schedule/output.cfm">
               
<cflog text = "Was the Schedule Task Ran?" file = "scheduletasklog">

This message was edited by johnbarrett on 10-18-12 @ 7:47 AM

cfSearchin
11-07-2012 @ 1:27 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Senior Member
Posts: 608
Joined: Feb 2008

Just print out the final status in the script. Then use the "file" attribute to capture the output.

http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7c6e.html

Cfdevshop
03-27-2013 @ 11:13 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Member
Posts:
Joined: Mar 2013

A scheduled task is really just an automatic call for a
normal CF page request. This means, if you manually
bring up the scheduled task URL in a browser window,
does it time out there as well?

Remember that a scheduled task is being called and run
by the server which will mean you can have different
session, CGI, request and form scope values as opposed
to an actual user. However, you can use the
requestTimeout attribute of the CFSETTING tag to extend
how long the page will have to complete the tasks
before it times out. The requestTimeout attribute takes
a value which represents number of seconds after which,
if no request back from the server, CF considers the
page to be unresponsive.

However, it would depend greatly upon what your
scheduled task is actually doing. There are all kinds
of ways you could take code to break it into
constituent parts for quicker processing. Maybe
figuring out what the loop is doing (and does it really
need to do all of everything it's doing) is a good
place to start.

Coldfusiondevshop

cfSearchin
03-28-2013 @ 8:05 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Senior Member
Posts: 608
Joined: Feb 2008

Any reason you are copying unrelated responses to old threads?

http://stackoverflow.com/questions/15675146/scheduler-is-it-too-heavy



Website Designed and Developed by Pablo Varando.