I've set up a scheduled task to run every 5 minutes for a coldfusion page, I've tried scheduling it in windows scheduler and cf scheduled task and even changed the server but I keep experiencing now and then the page seems stuck executing. Normally when the page runs it executes in under 30 secs. If I rerun it in the browser I have to run it a couple times for it to go through but it's not a solution as this task must run without issues every 5 mins. The task loops through different databases and pushes out tasks at the scheduled time. I can see it hangs on 1 particular database but when I view the current running SQL queries for that database I don't see anything that might be locking up the database.
So my question is what will be my next step in debugging this issue.
Please let me know if anyone has any ideas.
I found the issue, it was getting stuck on a server in the cfloop, so it wasn't code related. Once I fixed the outside server the cf page worked normal.
Thanks for the input from those that responded