thanks a lot . I did it , the project folder shouŁ d be in "web2py" folder . my project was in pycharm folder . after then , i did "cd C:\Users\narges\web2py" and then start the web2py server with IDE and then "web2py.exe -K MyApp" in cmd.
On Sun, Apr 3, 2016 at 9:46 AM, Dave S <snidely....@gmail.com> wrote: > On Saturday, April 2, 2016 at 9:44:53 PM UTC-7, narges Rezaei wrote: >> >> i use PyCharm for writing program and when it run ,web2py server will >> start . i work in windows. >> i open pycharm and create a web2py project. >> thanks. >> >> > Open a cmd.exe window ("DOS window"), and use the cd command to get to the > directory where web2py.exe is. > For me, that is > cd C:\Users\Dave\web2py_win\web2py_win-2141B > > > start web2py as a normal server however you prefer (from the command line, > or from your IDE) > > You can then enter the command > > web2py -i 0.0.0.0 -K MyApp > > (I don't have a scheduler use on my Windows machine, so this command > complains about no attribute '_scheduler'. Where I use the scheduler > happens to be a linux machine, for reasons outside of web2py) > > On Windows, I start my web2py instance from the command line, and it > throws up a small GUI panel. There's a menu item there for Scheduler, but > it doesn't do anything for me, probably because I don't have an app here > using the scheduler. > > /dps > > > > >> On Sun, Apr 3, 2016 at 9:08 AM, Dave S <snide...@gmail.com> wrote: >> >>> >>> >>> On Saturday, April 2, 2016 at 5:25:35 AM UTC-7, narges Rezaei wrote: >>>> >>>> i did not use it , i use "http://127.0.0.1:8000/myapplication" . >>>> >>>> >>> That is a URL. One typically enters that in a browser address box. >>> >>> How do you start the web2py server so that it responds to URLs? What >>> is your environment? >>> >>> /dps >>> >>> >>> >>> >>> >>> >>> >>>> On Saturday, April 2, 2016 at 1:53:37 PM UTC+4:30, Dave S wrote: >>>>> >>>>> On Saturday, April 2, 2016 at 2:04:19 AM UTC-7, narges Rezaei wrote: >>>>>> >>>>>> hi >>>>>> i have an application for send sms in certain time . i use pycharm >>>>>> (web2py) for writing this program and web2py scheduler . i can see the >>>>>> records of tasks in db.scheduler_task but no records in scheduler_run and >>>>>> scheduler_worker tables and also the task will execute befor insert in >>>>>> table . >>>>>> >>>>>> >>>>>> Here is part of my codes in default.py: >>>>>> def index(): >>>>>> t=mysched.queue_task( demo() ,start_time=request.now+ >>>>>> timed(seconds=60) ) >>>>>> q=mysched.task_status(t.id , output=True) >>>>>> >>>>>> and the code in scheduler.py in Models folder: >>>>>> >>>>>> from gluon.scheduler import Scheduler >>>>>> import time >>>>>> >>>>>> def demo(): >>>>>> #send sms in start time >>>>>> return None >>>>>> >>>>>> mysched = Scheduler(db, max_empty_runs=10 , discard_results=False) >>>>>> ###################### >>>>>> >>>>>> Could any one help me figure out the problem? >>>>>> Thanks! >>>>>> >>>>>> >>>>> >>>>> Did you start the scheduler with "python web2py.py >>>>> --regularoptionsgoheer -K" ? >>>>> >>>>> You can do this from the command line for a manual start. For >>>>> automatic restart after a boot, you need to put in the appropriate system >>>>> script. >>>>> >>>>> /ps >>>>> >>>>> >>>> -- >>> 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 a topic in the >>> Google Groups "web2py-users" group. >>> To unsubscribe from this topic, visit >>> https://groups.google.com/d/topic/web2py/sQL_0uu71gA/unsubscribe. >>> To unsubscribe from this group and all its topics, send an email to >>> web2py+un...@googlegroups.com. >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> -- > 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 a topic in the > Google Groups "web2py-users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/web2py/sQL_0uu71gA/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > web2py+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.