> Hi,
> I need to schedule a task that selects a bunch of email
> addresses from a
> database and then sends a specific email to them once a day,
> at 4 am. I
> looked at TaskKit, and i'm not smart enough to figure out how
> it works,
> and it looks like it might be overkill anyway, since I only am
> scheduling 1 function.
Here's a few snippets from my code that demonstrates using TaskKit.
# __init__.py in your context directory.
from BillingTask import BillingTask
import os, time
def contextInitialize(application,path):
tm = application.taskManager()
print "Adding BillingTask to taskManager."
task = BillingTask()
#tm.addPeriodicAction(time.time(),3600,task,"BillingTask")
tm.addDailyAction(4,0,task,"BillingTask"):
# BillingTask.py in your context directory.
from TaskKit.Task import Task
from SitePage import SitePage
class BillingTask(SitePage,Task):
def writeContent(self):
self.write("HELLO WORLD")
def run(self):
print "BillingTask.run()"
#self.billServiceInstances()
_______________________________________________________________
Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss