[web2py] Re: How to schedule a task to run at the same time every day

2014-02-21 Thread John Felps
Thanks for clarifying, I did find that. 

On Friday, February 21, 2014 9:05:35 AM UTC-7, LightDot wrote:
>
> In "trunk" refers to the development version of web2py. Basically, it 
> means that this feature will be available in the next web2py release, but 
> isn't a part of the current 2.8.2. You can check out web2py from google 
> code or github if you'd like to use it now - keeping in mind that you'll be 
> using a devel version that might include some less tested code, of course.
>
> Regards
>
>
> On Friday, February 21, 2014 4:54:12 PM UTC+1, John Felps wrote:
>>
>> Can I use it on the page appadmin/insert/db/scheduler_task?
>> If so, where does it go?
>> There are no fields called "trunk"
>>
>> On Friday, February 21, 2014 8:47:15 AM UTC-7, Niphlod wrote:
>>>
>>> it's a parameter (available in trunk), not an argument.
>>>
>>> On Friday, February 21, 2014 4:29:35 PM UTC+1, John Felps wrote:
>>>>
>>>> Thanks for the quick reply. When I try to add 
>>>> prevent_drift=True to the args in 
>>>> appadmin/insert/db/scheduler_task
>>>> I get invalid json
>>>>
>>>> On Friday, February 21, 2014 8:15:35 AM UTC-7, Anthony wrote:
>>>>>
>>>>> As of web2py 2.8.2, you can do:
>>>>>
>>>>> scheduler.queue_task(..., prevent_drift=True)
>>>>>
>>>>> See http://web2py.com/books/default/chapter/29/04/the-core#Scheduler.
>>>>>
>>>>> Anthony
>>>>>
>>>>> On Friday, February 21, 2014 9:54:09 AM UTC-5, John Felps wrote:
>>>>>>
>>>>>> I have a daily task, scheduled for midnight, with a repeat of 0 and a 
>>>>>> period of 86400 that has been running daily for about a month, but over 
>>>>>> time it has drifted so that it starts at nearly 4 am. How do I just tell 
>>>>>> the task to always start at midnight?
>>>>>>
>>>>>

-- 
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.


[web2py] Re: How to schedule a task to run at the same time every day

2014-02-21 Thread John Felps
Can I use it on the page appadmin/insert/db/scheduler_task?
If so, where does it go?
There are no fields called "trunk"

On Friday, February 21, 2014 8:47:15 AM UTC-7, Niphlod wrote:
>
> it's a parameter (available in trunk), not an argument.
>
> On Friday, February 21, 2014 4:29:35 PM UTC+1, John Felps wrote:
>>
>> Thanks for the quick reply. When I try to add 
>> prevent_drift=True to the args in 
>> appadmin/insert/db/scheduler_task
>> I get invalid json
>>
>> On Friday, February 21, 2014 8:15:35 AM UTC-7, Anthony wrote:
>>>
>>> As of web2py 2.8.2, you can do:
>>>
>>> scheduler.queue_task(..., prevent_drift=True)
>>>
>>> See http://web2py.com/books/default/chapter/29/04/the-core#Scheduler.
>>>
>>> Anthony
>>>
>>> On Friday, February 21, 2014 9:54:09 AM UTC-5, John Felps wrote:
>>>>
>>>> I have a daily task, scheduled for midnight, with a repeat of 0 and a 
>>>> period of 86400 that has been running daily for about a month, but over 
>>>> time it has drifted so that it starts at nearly 4 am. How do I just tell 
>>>> the task to always start at midnight?
>>>>
>>>

-- 
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.


[web2py] Re: How to schedule a task to run at the same time every day

2014-02-21 Thread John Felps
Thanks for the quick reply. When I try to add 
prevent_drift=True to the args in 
appadmin/insert/db/scheduler_task
I get invalid json

On Friday, February 21, 2014 8:15:35 AM UTC-7, Anthony wrote:
>
> As of web2py 2.8.2, you can do:
>
> scheduler.queue_task(..., prevent_drift=True)
>
> See http://web2py.com/books/default/chapter/29/04/the-core#Scheduler.
>
> Anthony
>
> On Friday, February 21, 2014 9:54:09 AM UTC-5, John Felps wrote:
>>
>> I have a daily task, scheduled for midnight, with a repeat of 0 and a 
>> period of 86400 that has been running daily for about a month, but over 
>> time it has drifted so that it starts at nearly 4 am. How do I just tell 
>> the task to always start at midnight?
>>
>

-- 
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.


[web2py] How to schedule a task to run at the same time every day

2014-02-21 Thread John Felps
I have a daily task, scheduled for midnight, with a repeat of 0 and a 
period of 86400 that has been running daily for about a month, but over 
time it has drifted so that it starts at nearly 4 am. How do I just tell 
the task to always start at midnight?

-- 
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.


Re: [web2py] Re: comma in html filename causing invalid request

2013-11-13 Thread John Felps
I substituted periods for commas and that seems to work. I'll have to find 
one of these unwritten rules manuals, although that sounds like a 
contradiction in terms. 

On Wednesday, November 13, 2013 8:25:37 AM UTC-7, Richard wrote:
>
> I thougth you were having trouble with filename... I just remember the old 
> not written rules... You do what you want...
>
>
> On Tue, Nov 12, 2013 at 9:34 AM, John Felps 
> > wrote:
>
>> Why? RFC 1738 states "Thus, only alphanumerics, the special characters 
>> "$-_.+!*'(),", and reserved characters used for their reserved purposes may 
>> be used unencoded within a URL." A comma is a valid 'special character'. 
>> The system I'm working with uses special characters to delineate special 
>> meaning. Hyphens and underscores are routed correctly. I can change it to 
>> use something else, a period perhaps, but seems kind of non-standard or 
>> unorthodox to not support the RFC.  
>>
>> On Monday, November 11, 2013 11:15:23 AM UTC-7, Leonel Câmara wrote:
>>>
>>> It is sort of unorthodox to have commas in the path section of your URL 
>>> unless you have code to specially deal with it and you're using it as a 
>>> separator for something.
>>>
>>
>>> So I'm guessing the regex in the examples doesn't consider the comma and 
>>> you have to change it.
>>>
>>> So change something like this: 
>>> routes_in=( (r'/static/(?P[\w./-]+)', r'/init/static/\g') )
>>> to: routes_in=( (r'/static/(?P[\w,./-]+)', 
>>> r'/init/static/\g') )
>>>
>>>
>>> My suggestion would be **not to do this**, and change the names of the 
>>> files to have no commas, static files are not user uploads, and should be 
>>> controlled by you.
>>>
>>>
>>> Segunda-feira, 11 de Novembro de 2013 15:29:34 UTC, John Felps escreveu:
>>>>
>>>> I have edited routes.parametric.example.py and saved as 
>>>> web2py/routes.py with the default application as myapp. I have some html 
>>>> files in static that now can be accessed as 
>>>>
>>>>
>>>> http://ip/myapp/static/dir/test.html or 
>>>> http://ip/static/dir/test.html
>>>> however, a couple of files have commas in the filename. They work when 
>>>> using 
>>>>
>>>> http://ip/myapp/static/dir/test,name.html
>>>>
>>>> but not with 
>>>>
>>>> http://ip/static/dir/test,name.html
>>>>
>>>> They return "Invalid Request" in this case. 
>>>>
>>>  -- 
>> 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+un...@googlegroups.com .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>

-- 
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.


[web2py] Re: comma in html filename causing invalid request

2013-11-13 Thread John Felps
Why? RFC 1738 states "Thus, only alphanumerics, the special characters 
"$-_.+!*'(),", and reserved characters used for their reserved purposes may 
be used unencoded within a URL." A comma is a valid 'special character'. 
The system I'm working with uses special characters to delineate special 
meaning. Hyphens and underscores are routed correctly. I can change it to 
use something else, a period perhaps, but seems kind of non-standard or 
unorthodox to not support the RFC.  

On Monday, November 11, 2013 11:15:23 AM UTC-7, Leonel Câmara wrote:
>
> It is sort of unorthodox to have commas in the path section of your URL 
> unless you have code to specially deal with it and you're using it as a 
> separator for something.
>

> So I'm guessing the regex in the examples doesn't consider the comma and 
> you have to change it.
>
> So change something like this: 
> routes_in=( (r'/static/(?P[\w./-]+)', r'/init/static/\g') )
> to: routes_in=( (r'/static/(?P[\w,./-]+)', r'/init/static/\g') 
> )
>
>
> My suggestion would be **not to do this**, and change the names of the 
> files to have no commas, static files are not user uploads, and should be 
> controlled by you.
>
>
> Segunda-feira, 11 de Novembro de 2013 15:29:34 UTC, John Felps escreveu:
>>
>> I have edited routes.parametric.example.py and saved as web2py/routes.py 
>> with the default application as myapp. I have some html files in static 
>> that now can be accessed as 
>>
>>
>> http://ip/myapp/static/dir/test.html or 
>> http://ip/static/dir/test.html
>> however, a couple of files have commas in the filename. They work when 
>> using 
>>
>> http://ip/myapp/static/dir/test,name.html
>>
>> but not with 
>>
>> http://ip/static/dir/test,name.html
>>
>> They return "Invalid Request" in this case. 
>>
>

-- 
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.


[web2py] comma in html filename causing invalid request

2013-11-11 Thread John Felps
I have edited routes.parametric.example.py and saved as web2py/routes.py 
with the default application as myapp. I have some html files in static 
that now can be accessed as 


http://ip/myapp/static/dir/test.html or 
http://ip/static/dir/test.html
however, a couple of files have commas in the filename. They work when 
using 

http://ip/myapp/static/dir/test,name.html

but not with 

http://ip/static/dir/test,name.html

They return "Invalid Request" in this case. 

-- 
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.


[web2py] Re: SQLFORM with multiple buttons how to differentiate

2013-10-31 Thread John Felps
OK, thanks. I found a workaround; by naming each button differently and 
instead of checking the value, just check for name in request.vars. 

On Wednesday, October 30, 2013 6:30:53 PM UTC-6, John Felps wrote:
>
> I have an sqlform that populates from a db and has several submit buttons 
> named test with different _values (and appear with different names on the 
> screen). In PHP, the post['test'] would be equal to the button value, 
> however, request.vars includes test, but it is always "Working..." on 
> submission. I need to perform tasks based on the input button for this 
> form. 
>

-- 
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.


[web2py] SQLFORM with multiple buttons how to differentiate

2013-10-30 Thread John Felps
I have an sqlform that populates from a db and has several submit buttons 
named test with different _values (and appear with different names on the 
screen). In PHP, the post['test'] would be equal to the button value, 
however, request.vars includes test, but it is always "Working..." on 
submission. I need to perform tasks based on the input button for this 
form. 

-- 
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.


[web2py] Why is button value always set to "working..." in request.args

2013-10-30 Thread John Felps

I have an SQLFORM that populates from a database and that has buttons set 
to 

buttons = [TAG.button('1', _name='test'), 
   TAG.button('2', _name='test'), 
   TAG.button('3', _name='test'), 
   TAG.button('4', _name='test')]

and when I look at the form.vars, test isn't there, but it is in 
request.vars, but no matter which button is clicked it always is set to 
"Working..."

I'd like to do different things with the form based on which button is 
clicked. 

Thanks!

-- 
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.