Few suggestions... 
1.  Try running the job in the foreground.  Upstart docs. recommend this 
wherever its an option.. If you do run the job in the background,  be sure 
you have an "expect fork" or "expect daemon" stanza so Upstart can follow 
the process.
2.   When running in the foreground, if you have a "console log" stanza all 
of the console output will go to /var/log/upstart/-jobname-.log... this can 
be helpful.
3.   You don't have any environment variables unless you set them with "env 
VAR=x" etc.... this includes HOME and PATH etc.

It seems rather counterintuitive to not run your daemon as a daemon... but 
it solved a lot of the issues I was having with jobs that just wouldn't 
start.  Hope it helps.

On Tuesday, September 10, 2013 6:28:13 AM UTC-7, ajith c t wrote:
>
> ok i will try making two separate services. and which log are you checking 
> out, I maintain my custom logging mechanism. The only thing that comes in 
> it is 
>
> DEBUG - web2py.scheduler - defining tables (migrate=True)
>
> the app doesnt assign a worker in the scheduler_task table. The column 
> shows a NULL value. 
>
> I am using nginx, when I remove the -X parameter it results in a bad 
> gateway,
>
>
>
> On Tuesday, 10 September 2013 18:21:36 UTC+5:30, Niphlod wrote:
>>
>> why don't you schedule two separate services (the webserver and the 
>> scheduler), so the issues will be easier to track down ? what's in the logs 
>> ?
>>
>> On Tuesday, September 10, 2013 1:42:11 PM UTC+2, ajith c t wrote:
>>>
>>> Hi All,
>>>
>>>       I have a scheduler in my app in the models folder with some 
>>> specific task. I need to run the app as a service in the server. I cant 
>>> figure out how to run start the web2py with the arguments.
>>>
>>>
>>> script
>>>      exec python -- /srv/tv-fe/web2py.py -K app -X --nogui -p 8000 -i 
>>> 0.0.0.0 -a ''   &
>>> end script
>>>
>>> The above script is used to run the app. Upon running it , it doesnt 
>>> generate error, but the worker is not created in the scheduler_worker 
>>> table. So none of my task gets executed.
>>>
>>> Where am I getting wrong with the parameters
>>>
>>> Thanks and regards
>>> Ajith
>>>
>>>

-- 
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/groups/opt_out.

Reply via email to