thanks for your response, I am going to use APScheduler to schedule certain task on time interval, this scheduler has to start upon starting of application/webserver first time and should continuously run till web server stops. Basic code here in below:
from apscheduler.scheduler import Scheduler sched = Scheduler() sched.add_interval_job(perform_task,hours=24) sched.start() as per above code scheduler has to execute perform_task every 24 hours, irrespective of how many user accessing the application, so how to use it in your suggested solution? On Thu, Jul 19, 2012 at 11:41 AM, Cédric Mayer <argla...@gmail.com> wrote: > Can't you use in a model. > cache.ram('parallel_thread_name', <function that creates the thread>, None) > so that you have the thread created at first connection. > > I don't know how to close it afterwards though. Maybe using a cron job ? > > Le jeudi 19 juillet 2012 05:24:03 UTC+2, Amit a écrit : >> >> Hi Massimo, >> could you please provide me the solution for this? >> >> On Wednesday, 18 July 2012 08:37:23 UTC+5:30, Amit wrote: >> >>> for development purpose I am using Rocket but will deploy the >>> application to ubuntu machine where web server will be apache, so please >>> provide me solution for both. >>> >>> On Tue, Jul 17, 2012 at 8:41 PM, Massimo Di Pierro wrote: >>> >>>> Do you use rocket (the built-in web server) or apache? >>>> >>>> >>>> On Monday, 16 July 2012 23:42:49 UTC-5, Amit wrote: >>>>> >>>>> Hi, >>>>> I have one timer thread which has to start once when web sever starts >>>>> very first time and stop when web server stops, means it should be running >>>>> continuously irrespective of how many users interacting with the >>>>> application so there is only one instance of this thread running though >>>>> out >>>>> life of the application , it is common for all users who are accessing the >>>>> application. >>>>> >>>>> How to achieve it in web2py? >>>>> >>>>> -- >>>> >>>> >>>> >>>> >>> >>> -- > > > > --