Have a query with total just 40 records in it. It is giving a timeout connection error to database when running as scheduler.But,its working fine when we execute separately this query in a test page. Also,the scheduler ran at 2 times one at 6am and another 9.30 am. Its working without error on 6am while its giving db connection timeout error at 9.30.
Checked the coldfusion out log file,but could not find any trace of the error. Any guidance is appreciated.
Not sure how helpful my response will be, but things don't "run as scheduler". The scheduler just has CF make a CFHTTP call to whatever page you want to run. So, what you want to look for are the differences you might see between running a page via CFHTTP vs running it directly in your browser. There can be a lot of differences there: DNS not working, for example. That doesn't sound like what's going on here, though.