Quantcast
Channel: Adobe Community : Discussion List - All Communities
Viewing all articles
Browse latest Browse all 238792

session counter vs cfschedule

$
0
0

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>

 

</cfif>
This way cfschedule is not counted as a site user, hence not logged.
Now my question to the community is:
How do you detect cfschedule event on session end? I was unable to locate any documentation explaining what sort of information is being passed inside the sessionScope to onSessionEnd function, hence how to access CGI info (if it's possible at all).

 

 

Absolutely any input on this would be highly appreciated!

 

Regards,

Simon


Viewing all articles
Browse latest Browse all 238792

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>