Skip to main content
Known Participant
November 13, 2009
Question

Scheduled Tasks NOT rescheduling

  • November 13, 2009
  • 1 reply
  • 3161 views

Hey folks,

I'm using CF 9 on a Windows 2008 system and having an odd problem in which after a schedule task executes, it does not always reschedule.  For one, it's a simple CF page that calls a Storedprocedure that runs for a few hours to process some data.  I have that system setup to email me when it starts and when it ends.  It ran fine for a couple days but then I noticed that it DID NOT run last night and checking the logs for scheduled tasks, there is not a log entry where it rescheduled it for the next morning.   The SP runs fine, just takes a while to complete.  So I'm thinking there may be some sort of bug but I'm not sure.   But it ran yesterday and I received both emails meaning it seemingly finished but then never rescheduled.

Actually, I wonder if the job could be "still running" or hung somewhere?  Even though I got both emails.  I ask that because I have a second job that does basically the same thing, it starts, sends me a beginning email, does the job, sends me an ending email, then does NOT reschedule.   So I guess I have 2 jobs doing the same thing.    Is there a way I can look at any thread information to see if the thread ever ended?

Here's the code of the CFM page being executed:

<cfmail to="srushing@XXXX.com" from="srushing@XXXX.com" subject="Running New Ratings Calc" server="relay.XXXX.com">
Ran at #now()#
</cfmail>

<cfstoredproc procedure="RatingSummaryCalculation" datasource="YYYY">
<cfprocresult name="result" resultset="1">
</cfstoredproc>


<cfmail to="srushing@XXXX.com" from="srushing@XXXX.com" subject="Running New Ratings Calc - Finished" server="relay.XXXX.com">
Ran at #now()#
</cfmail>

    This topic has been closed for replies.

    1 reply

    Inspiring
    November 13, 2009

    Change one of the email addresses so that the from and to are not the same and see if that does it. I've always had trouble with that in CFMAIL, it puts the mail server into a never ending loop.

    srushingAuthor
    Known Participant
    November 14, 2009

    Thanks for the reply.  Actually, they are.  it's not clear in that previous post since I marked all the domains with XXXX but they actually are coded to different to and from email addresses.

    Actually it's sort of weird.  One job, the CF coded one, if I run interactively, never ends.  Even though it sends me emails ( that are the first and last lines of the cfm file) which say it's started and it's finished, the thread never ends.  In the browser it just keeps going long after the emails are received until the browser just reports a generic errors about not being able to reach the server.    As a test, I put a <cfabort> directly after the last CFMAIL tag (which does execute and send me an email saying the job is done), but that changed nothing. The thread never releases.  it's like it's lost somewhere and none of the displays (cfoutputs, cfdumps, etc) that I have as debugging code in the app) actually work.  nothing comes to standard out even though I have <cfflush interval="1"> at the top.

    Inspiring
    November 14, 2009

    Then I suppose a look at the stored proceedure is where to go from here. Remove any sensitive info and post it or I'll give you my email address.