Frontier 8.0: keepFrontierRunning for Windows
flaunch.exeIn this folder is a Windows application, flaunch.exe. It's a faceless app that checks periodically to see if Frontier is running, if it's not, it launches it. With this app running, you can safely call fileMenu.quit, from a scheduled script, to cause Frontier to restart periodically.
Use it on a 24-by-7 server
Some system operators like to relauch all their server software every 24 hours, and it's actually a good practice with Frontier if a server application tends to run low on memory. There are certain policies in the Frontier kernel that cause large tables to remain in memory for the life of the program. So by quitting and relaunching Frontier, you can start fresh, and this can boost the performance of Frontier servers.
Advice
Keep it simple. If you're a new server operator, don't use this script. It'll make your life more complicated. On the other hand, if you're an experienced developer and are willing to babysit this for a few weeks until you get your Frontier-quitting script working as you like it, quitting and restarting Frontier can in some cases improve the performance of your server.
Example script
Here's a script that runs from the user.scheduler.everyMinute table. It quits after 10,000 hits, and only when the server isn't busy executing hourly tasks or serving users. The basic design is to get Frontier to quit when it's not especially busy. No doubt more sophisticated algorithms are possible.
if system.environment.isWindows //make sure the flaunch app is running if not sys.appisrunning ("flaunch.exe") local (frontierPath = Frontier.getProgramPath ()) local (frontierFolder = file.folderFromPath (frontierPath)) local (flaunchPath = frontierFolder + "Extras\\keepFrontierRunning\\win\\flaunch.exe") launch.appWithDocument (flaunchPath, frontierPath)if user.webserver.stats.hits > 10000 if Frontier.countThreads () == 1 local (day, month, year, hour, minute, second) date.get (clock.now (), @day, @month, @year, @hour, @minute, @second) if minute != 0 //don't quit while hourly tasks are running filemenu.save () filemenu.quit ()
-UserLand Software, Inc.
© Copyright 1992-2002 UserLand Software. This page was last built on 02/12/2002; 8:08:01 PM. Webmaster: webmaster@userland.com.