Don't know if this is related or if it will help at all but I ran into an
issue with a scheduled task I had registered and subsequently made changes
in the script that it ran. After not seeing any of the changes I had made in
the code, I ended up googling the issue, it was suggested that I drop the
scheduled task and register it again and that took care of the issue I had.
I found I could bypass doing this in the administrator by running my script
via an http call to it, much faster too ;)

Bob

> -----Original Message-----
> From: Jeff Meagher [mailto:[EMAIL PROTECTED]
> Sent: Thursday, May 24, 2007 11:28 AM
> To: CF-Newbie
> Subject: application variables not working with CF scheduled tasks
> 
> I recently ran into an issue with CF MX7 scheduled tasks (Win2K3, IIS6,
> CFMX 7).  I've got a script that grabs data from a remote database every 5
> hours and puts it into our databases at work so people using the website
> can search for real estate properties.
> 
> First, this script runs from a directory below my webroot, where an
> Application.cfc file exists.  In there, there's an onError handler that is
> supposed to send me an email every time there's an error on the site --
> pretty standard practice from what I hear.  However, I forgot to add the
> remote datasource to CF administrator, so I should have been getting
> errors emailed to me when that script ran every 5 hours.  I never got the
> emails from that script, but I did from other errors on the site.  To
> remedy that, I put in a try/catch.
> 
> The first email I got from the try/catch told me that "remoteDSN is
> undefined in application".  When I pointed my browser directly to the CF
> page, it ran with no problems.  5 hours later, I got another email with
> the same undefined in application error.  Again, going to the page in the
> browser worked.  I couldn't think of why that wasn't working, but I took
> added a <cfset application.remoteDSN = 'thedatabase'> at the top of the
> page and have yet to get an error email.  I also know it's now working as
> I record the times the data is populated in our database: every 5 hours,
> like clockwork.
> 
> My question is simply, "When CF runs a scheduled task that was created in
> the administrator, does it ignore the Application.cfc file in the
> webroot?"  If there's a setting somewhere I missed that can toggle that,
> I'd also be interested in that.  And if anyone else has had this issue (or
> not had this issue and successfully used application variables in a CF
> scheduled task).
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Macromedia ColdFusion MX7
Upgrade to MX7 & experience time-saving features, more productivity.
http://www.adobe.com/products/coldfusion?sdid=RVJW

Archive: 
http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:2759
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15

Reply via email to