Hi Djordje,
Kevin's approach is not a bad one - although starting a new exe can be tricky if you don't get all the permissions right.
I would probably do something similar to what you are doing, but I would have a separate thread do all the house-keeping.
In other words, after the web server has started up - say after 30 seconds or so, trigger
HouseKeepingThread = Start(HouseKeeping,25000)
That can be it's own window with a timer, and do all the things it needs to do. You can add as much code in there as you like, but the risk of interfering with the server is very low.
Only extra thing you need to add is the ability to POST a close:Window to that thread when the parent (ie web server program) wants to close. Otherwise the Exe will not close completely.
Cheers
Bruce