Hi all,
Got a bit of a riddle here. Trying to count current active number of sessions and as per ColdFusion documentation that should be done as follows:
onSessionStart:
<cfset Application.sessions = Application.sessions + 1>
onSessionEnd:
<cfset Arguments.ApplicationScope.sessions = Arguments.ApplicationScope.sessions - 1>
That all works as expected as long as one doesn't use cfschedule events. Now in my application cfschedule runs every minute as a result creating new sessions as it goes. What I'm trying to do is detect cfschedule event as a session 'runner' and ignore it for my session totals.
On session start, that is done as follows:
<cfif FindNoCase("CFSCHEDULE",CGI.HTTP_USER_AGENT) EQ 0>
<cfset Application.sessions = Application.sessions + 1>
Absolutely any input on this would be highly appreciated!
Regards,
Simon