NetTalk Central

Author Topic: Timer on webserver window?  (Read 2523 times)

JohanR

  • Sr. Member
  • ****
  • Posts: 366
    • View Profile
    • Email
Timer on webserver window?
« on: February 06, 2014, 11:55:09 PM »

Hi,

I need to run a timer on the webserver window.
Plan is to to do a dummy read on the DB to keep the IPserver connection going as well as a little bit of housekeeping.
What is the ideal time for the timer?
Idea is 5secs
and then manage the intervals when the actual housekeeping is done.
Some once a day, other every hour.

Anything to watch out for?


thanks

Johan


Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: Timer on webserver window?
« Reply #1 on: February 07, 2014, 08:57:59 PM »
Timer should be fine as you described.

Only thing to watch out for - be VERY careful not to do anything that would open another window or contain another ACCEPT loop. That would cause events to the server to get lost -specifically TCP/IP events rendering your server broken.

Bruce

JohanR

  • Sr. Member
  • ****
  • Posts: 366
    • View Profile
    • Email
Re: Timer on webserver window?
« Reply #2 on: February 09, 2014, 02:59:20 AM »


Hi Bruce

thanks for that.
so safest bet would be to start a threads that only do file access in short bursts.


Johan