Frontier 8.0: keepFrontierRunning for Macintosh
It's an AppleScriptIt's a very simple AppleScript that, once every 10 seconds, checks to see if Frontier is running. If not, it launches it.
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.
How to Install
On the machine that your Frontier server is running on, copy the keepFrontierRunning AppleScript into the Startup Items folder.
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 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:07:54 PM. Webmaster: webmaster@userland.com.