If I get an exception in a scheduled task that cal...
# lucee
a
If I get an exception in a scheduled task that calls a page in my app: 1. the exception is only logged in the server context application log 2. it does not fire my onError handler in app.cfc 3. Fusion reactor shows 2 entries in transaction error history a. 1 with an app/txn name of 'MyApplication' - literally - that is not what my app is called 😉 b. 1 with a app/txn name of ROOT - also not what my app is called. Is this what is expected? I assume the lucee scheduler runs everything in some special process that bypasses the normal event handlers. running 5.3.9.160. Thanks
z
what's the error?
a
I dug into this a bit more and figured I'd close the loop on it. 1. from brief testing - scheduled tasks are called by HTTPClient and it seems that if you call another page in the site with a CFHTTP call and that called page raises an exception, the OnError handler is not executed. .. so its not really a scheduled task thing, just a CFHTTP thing. 2. Fusion reactor has a setting for naming applications it can't identify by host name... and the default name for an unidentified app is 'MyApplication'.. So you will see that in request history. It's unidentified I think because lucee scheduled tasks have the port attached to the call and FR seems to identify apps based on exact host_name - so if your app is called app27 running on x.y.com and the FR URL is logged as x.y.com:443 - there's no match
z
yeah, cfschedule doesn't run inside an application context, so there's no onError() to be triggered, however, it should be triggering within the application's called page