Access application context from Event Gateway

My understanding of Event Gateways is that they run outside of the current application context, even though they are defined at the web level. I have a task that I’d like to run every few seconds, and would like to be able to reuse a lot of the config and logic that is set-up in my main Application.cfc and stored in the application scope.

I’ve tried setting up an event gateway that just sends a HTTP request to a url that is handled by my application, but for some reason this silently stops functioning after a few hours. I could dig even deeper to get to the bottom of why it’s stopping (I’ve done a fair amount of digging thus-far), but since this logic doesn’t need access to the Client,Session or Request scope, there’s no real benefit in using an HTTP request vs having logic that just executes the method directly. However I just can’t seem to find a good way to do this.

If anyone has any insight or suggestions, it’d be really appreciated. Basically I’d like to run a query every second or two to check a table for a new record, and if it exists, execute a method in a CFC I have, that relies heavily on set-up done in Application.cfc that is shared among the rest of my application.

Thank you in advance for any help.