Sorry, now I have no idea about the error, since I'm still very new to
web2py. :-)
Anyone know about this error?
On Thu, Mar 1, 2012 at 2:16 PM, Sanjeet Kumar sanjeet@gmail.com wrote:
Luciano i removed the one * before the applications and tryed than i got
the following error :-
I have the following code in my crontab :-
0-59/1****root **applications/welcome/cron/test.py
and the following code in my test.py which are inside the cron folder in my
application :-
db.person.insert(name=Alex)
and i want to insert this into the table person which are
On Wed, Feb 29, 2012 at 11:10 PM, Sanjeet Kumar sanjeet@gmail.comwrote:
I have the following code in my crontab :-
0-59/1****root **applications/welcome/cron/test.py
put just 1 * before applications/
[],
--
Luciano Pacheco
blog.lucmult.com.br
Luciano i removed the one * before the applications and tryed than i got
the following error :-
OperationalError: unable to open database file
Traceback (most recent call last):
File /home/tls-sanjeet/Desktop/test/web2py/gluon/restricted.py, line
204, in restricted
exec ccode in
i tried this but i am not be able to run my controller Can you give me the
simple example through which i can run the function written under the
controller inside my application
On Mon, Feb 27, 2012 at 5:39 PM, Luciano Pacheco lucm...@gmail.com wrote:
Example:
Following the same example.
In you controller:
from applications.instore.modules.background_updater main
def force_background_updater():
ret = main()
return 'The result was: %s' % ret
But, the cron is run time based tasks, usually those tasks won't be used in
controller.One exception
I am not be able to get you properly can you give me the better
clarification i have the default controller and the index function can you
tell me how can i run the index function by using crontab which are in my
application folder.
On Tue, Feb 28, 2012 at 4:12 PM, Luciano Pacheco
You want to run the index function of your controller in a cron ?
Usually it doesn't make sense, but, in the example file
# file: applications/instore/modules/background_updater.py
from applications.instore.controllers.default import index
# instead of time.sleep(5), inside the function main()
Yes I want to run the index function of my default controller in a cron is
this possible or not ?
On Tue, Feb 28, 2012 at 4:58 PM, Luciano Pacheco lucm...@gmail.com wrote:
You want to run the index function of your controller in a cron ?
Usually it doesn't make sense, but, in the example file
I have written to you how to do that.
Copy and paste:
, but, in the example file, do this changes:
# file: applications/instore/modules/background_updater.py
from applications.instore.controllers.default import index
# instead of time.sleep(5), inside the function main()
index()
On Tue,
Thanks Luciano i will try.
On Tue, Feb 28, 2012 at 5:06 PM, Luciano Pacheco lucm...@gmail.com wrote:
I have written to you how to do that.
Copy and paste:
, but, in the example file, do this changes:
# file: applications/instore/modules/background_updater.py
from
Example:
http://movu.ca/demo/article/show/31/web2py-cron-task
My first try in movu.ca :-)
On Mon, Feb 27, 2012 at 2:32 PM, Sanjeet Kumar sanjeet@gmail.comwrote:
Exactly I need the examples
On Mon, Feb 27, 2012 at 4:56 AM, Luciano Pacheco lucm...@gmail.comwrote:
I think Sanjeet means,
thanks Luciano! I will migrate your recipe to the new web2pyslices website.
http://zerp.ly/rochacbruno
Em 27/02/2012 09:16, Luciano Pacheco lucm...@gmail.com escreveu:
Example:
http://movu.ca/demo/article/show/31/web2py-cron-task
My first try in movu.ca :-)
On Mon, Feb 27, 2012 at 2:32
It's all in the book (if you haven't seen yet)
http://web2py.com/books/default/chapter/29/4#Cron
By the way, The link in web2py to cron (http://web2py.com/books/
default/reference/29/cron) is broken (returns an invalid function
message)
On 26 feb, 13:09, Sanjeet Kumar sanjeet@gmail.com
I think Sanjeet means, I example of the task.
What is a good practice in the task, or what kind of variables are present
in the local namespace automagically, etc. A task should be a class a
function, a python module?
I had the same question last week when I was reading this chapter. :-)
By the way, The link in web2py to cron (http://web2py.com/books/
default/reference/29/cronhttp://web2py.com/books/default/reference/29/cron)
is broken (returns an invalid function
message)
Actually, there's a bug in the book app -- all the reference links are
broken.
Exactly I need the examples
On Mon, Feb 27, 2012 at 4:56 AM, Luciano Pacheco lucm...@gmail.com wrote:
I think Sanjeet means, I example of the task.
What is a good practice in the task, or what kind of variables are present
in the local namespace automagically, etc. A task should be a class a
17 matches
Mail list logo