i like massimo's idea of using cron...but if you need it to be launched by the user perhaps you setup cron to run at small intervals and have the job simply check if the user has requested work, and then do the work. i suspect that is much easier than getting the threading right.
cfh On Apr 28, 2:31 pm, Jose <[email protected]> wrote: > On 28 abr, 16:11, mdipierro <[email protected]> wrote: > > > Do not use threads for background processes. Use an actual seperate > > process > > > python web2py.py -S app -M -R applications/app/private/ > > process_script.py > > > You can have it start by web2py cron > > A cron do not need it, since it must be the user who launches the > process. > > Running the script as you said, how to access the same to application > context: db, session, etc. > > I use subprocess to run? > > Jose

