Try putting the startup and shutdown code into the __init__.py in your context directory like this (untested):
def contextInitialize(app, dir): startTasks() app.addShutDownHandler(stopTasks) def startTasks(): print 'Starting tasks...' # start your tasks... def stopTasks(): print 'Stopping tasks...' # stop your tasks - Geoff > -----Original Message----- > From: Edmund Lian [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, January 21, 2003 2:00 AM > To: [EMAIL PROTECTED] > Subject: [Webware-discuss] Where to put TaskKit startup/shutdown code? > > > I need to start one or more tasks (using TaskKit) when > Webware starts, and > also shut the tasks down in an orderly way when Webware is > shutdown. The > tasks need to be controlled from a servlet, so they need to > be accessible > from within Webware. Where's a good place to put the start up > and shutdown > code? > > ...Edmund. > > > > ------------------------------------------------------- > This SF.NET email is sponsored by: > SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! > http://www.vasoftware.com > _______________________________________________ > Webware-discuss mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/webware-discuss > ------------------------------------------------------- This SF.net email is sponsored by: Scholarships for Techies! Can't afford IT training? All 2003 ictp students receive scholarships. Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more. www.ictp.com/training/sourceforge.asp _______________________________________________ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss