You should never use 'send in time' or 'wait with messages' in LCServer.

Each http request starts up your LC server script anew - and you need that request to be handled and the server-instance shut down as quickly as possible. And the next http request will start up another, entirely separate, instance; so you need to be storing some status info between requests.

If a user doesn't do anything on the site for a few minutes, then you can use a flow something (vaguely) like :

(at start of the script):

 - check if user is logged in (if not, prompt them to login / register / ...)

 - check a database entry for when they were last active (up to you whether that's per-user, per user/per-IP address, or per-some-cookie, or ...)

 - if time-since-last-action is too long - log them out, and as appropriate, either
      a.  apologise :-), and go to login screen
      b. return a "not logged in" error

 - if it is still within time, then update the "last active" database entry

 - then do the rest of the current request


Alex.

On 18/07/2019 17:45, Rick Harrison via use-livecode wrote:
I  was playing around with Send In Time
with LC Server.  It’s throwing an error
at me after it’s supposed to be all done
executing.

The reason I was playing with such things
is I want to be able to logoff any user that
hasn’t been using the website for a few
minutes when the system times out.

How are you handling such things in
LC Server?

I did come across a Javascript that
might work, but I’d rather use LC
for the task if possible.

Suggestions?

Thanks in advance!

Rick
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to