On Thursday, May 18, 2017 at 6:19:06 AM UTC-7, icodk wrote: > > For testing purposes I would like to execute a function in scheduler.py > using command line (better ideas are welcome) > I tried: > web2py.exe -S myapp/scheduler/dummy_task -M > > But got the following error > web2py Web Framework > Created by Massimo Di Pierro, Copyright 2007-2017 > Version 2.14.6-stable+timestamp.2016.05.10.00.21.47 > Database drivers available: psycopg2, pymysql, imaplib, MySQLdb, sqlite3, > pyodbc > Traceback (most recent call last): > File "<string>", line 6, in <module> > File "__main__.py", line 128, in <module> > File "__main__web2py__.py", line 33, in <module> > File "C:\Dev\web\web2py_win\web2py_2_14_06\gluon\widget.py", line 1146, > in start > cronjob=options.cronjob) > File "C:\Dev\web\web2py_win\web2py_2_14_06\gluon\shell.py", line 245, in > run > exec read_pyc(pycfile) in _env > File "C:\Dev\web\web2py_win\web2py_2_14_06\gluon\compileapp.py", line > 461, in read_pyc > data = read_file(filename, 'rb') > File "C:\Dev\web\web2py_win\web2py_2_14_06\gluon\fileutils.py", line > 103, in read_file > f = open(filename, mode) > IOError: [Errno 2] No such file or directory: > 'applications\\myapp\\compiled\\controllers_scheduler_dummy_task.pyc' > > > > Thanks for any help >
I haven't tried to do that, but it's easy enough to use a "non-exposed" function to QUEUE a task. It's now in the book (in the latest builds, but not yet on the website). See <URL:https://groups.google.com/d/msg/web2py-developers/cI7R-9hex7k/PfTsGodYEwAJ> for the draft text. /dps -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

