jose@... wrote:
> Hi all,
>
> I have a project that I think taskkit might be helpful for, however I am
> having alot of trouble understaning how it all works. this is what I have
>
> in my __init__.py file for the context I have:
>
> # Task init
> # __init__.py
>
>
> from TaskKit import Task
> from testrun import testrun
> import time
>
>
>
> def contextInitialize(application, path):
> print 'hello task'
> print application
> print path
> task = testrun()
>
> Also in the same contecx I have a file called testrun.py:
> om TaskKit import Task
> from WebKit.ccm.ccmPage import ccmPage
>
> class testrun(ccmPage,Task):
> def run(self):
> print 'and now for something completely different'
>
> but when I start the appserver I get an error that says module is not
> callable and it is refering to test=testrun()
>
> I'm not sure what I am doing work, this look right given the different
> examples i've seen. Any and all help would be very much appreciated
I'm not sure what you're trying to do, above, but the thing you probably
want is:
application.taskManager().addDailyAction(hour, minute, testrun(), testrun)
and/or
application.taskManager().addPeriodicAction(start_time,
seconds_in_between_runs, testrun(), testrun)
--
Randall Randall <randall@...>
"Not only can money buy happiness,
it isn't even particularly expensive any more." -- Spike Jones
|