ColdFusion page timeouts and scheduled tasks

Thanks to Micah Brown for checking into this. He emailed me a few days ago with an interesting question. Given that your server may be set to timeout requests after 10 seconds, will the timeout in the settings of your scheduled task override it? When he asked this, I simply told him what I’d do. Set your server timeout setting to a nice low number, like 10, set your scheduled task to a higher number, like 20, and then drop in a simple sleep() command in your CFM:

<cfset sleep(15000)>

He tested it… and yes - the setting in your scheduled task can override the server-side setting. I’ll also remind people that outside of scheduled tasks, you can also use the cfsetting tag to override the setting.

Raymond Camden's Picture

About Raymond Camden

Raymond is a developer advocate for Extend by Auth0. He focuses on serverless and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support.

Lafayette, LA