Re: [web2py] Re: Cron doesn't work for me...

2011-03-15 Thread Tito Garrido
Hi VP! How did you use the system cron? I'm wondering how can I specify the function that I want to execute... Regards, Tito On Tue, Mar 15, 2011 at 1:53 AM, VP vtp2...@gmail.com wrote: Cron didn't work for me either, so I used the system cron. One question I have though is why root when

[web2py] Re: Cron doesn't work for me...

2011-03-15 Thread VP
I answered your email. Briefly (on Linux/Unix): + Use crontab -l to see your cron entries. + Use crontab -e to create/edit cron entries. + Google / wikipedia for cron syntax. To execute a URL (e.g. web2py controller, you can either use wget or curl). On Mar 15, 8:05 am, Tito Garrido

Re: [web2py] Re: Cron doesn't work for me...

2011-03-15 Thread Tito Garrido
Thanks! On Tue, Mar 15, 2011 at 1:06 PM, VP vtp2...@gmail.com wrote: I answered your email. Briefly (on Linux/Unix): + Use crontab -l to see your cron entries. + Use crontab -e to create/edit cron entries. + Google / wikipedia for cron syntax. To execute a URL (e.g. web2py controller,

[web2py] Re: Cron doesn't work for me...

2011-03-14 Thread Tito Garrido
In fact, seems that it doesn't work on webfaction... On Mon, Mar 14, 2011 at 9:15 PM, Tito Garrido titogarr...@gmail.com wrote: Not sure why but cron never worked for me... 0-59/1 * * * * root *admin/test def test(): mail.send('titogarr...@gmail.com','test','teste') return

[web2py] Re: Cron doesn't work for me...

2011-03-14 Thread Massimo Di Pierro
I think 0-59/1 * * * * root *admin/test should be 0-59/1 * * * * root *admin/default/test there may be other problems. On Mar 14, 7:15 pm, Tito Garrido titogarr...@gmail.com wrote: Not sure why but cron never worked for me... 0-59/1 * * * * root *admin/test def test():    

[web2py] Re: Cron doesn't work for me...

2011-03-14 Thread VP
Cron didn't work for me either, so I used the system cron. One question I have though is why root when web2py is run as www- data?

[web2py] Re: Cron doesn't work for me...

2011-03-14 Thread Massimo Di Pierro
The user is irrelevant. The value is not used. On Mar 14, 11:53 pm, VP vtp2...@gmail.com wrote: Cron didn't work for me either, so I used the system cron. One question I have though is why root when web2py is run as www- data?

[web2py] Re: cron doesn't work

2011-02-18 Thread LightOfMooN
Yes, it's work fine manually, if I call it in a browser. And yes, I'v restarted web2py many times ;) On 18 фев, 04:46, pbreit pbreitenb...@gmail.com wrote: Ah, ok. Looks like it is probably following a route. Sorry about that. So if you just call the function in a browser it works fine? But

[web2py] Re: cron doesn't work

2011-02-18 Thread LightOfMooN
Yes, it's work fine manually. And yes, I restarted web2py many times ;) On 18 фев, 04:46, pbreit pbreitenb...@gmail.com wrote: Ah, ok. Looks like it is probably following a route. Sorry about that. So if you just call the function in a browser it works fine? But the cron doesn't seem to

[web2py] Re: cron doesn't work

2011-02-17 Thread b0j3
I tried the same on my cron (just working on it) and it looks like it doesn't run when web2py is run in wsgi under Apache2. When I start it with python web2py works w/o a problem. Strange. B. On 17 feb., 08:24, LightOfMooN vladsale...@yandex.ru wrote: How to check, is the cron working? If i

[web2py] Re: cron doesn't work

2011-02-17 Thread LightOfMooN
Have somebody know any solution for this problem? On 17 фев, 13:08, b0j3 boje...@gmail.com wrote: I tried the same on my cron (just working on it) and it looks like it doesn't run when web2py is run in wsgi under Apache2. When I start it with python web2py works w/o a problem. Strange. B.

[web2py] Re: cron doesn't work

2011-02-17 Thread b0j3
According to my understanding of web2py book you should use hard coded cron, which means the system one. On 17 feb., 12:03, LightOfMooN vladsale...@yandex.ru wrote: Have somebody know any solution for this problem? On 17 фев, 13:08, b0j3 boje...@gmail.com wrote: I tried the same on my cron

[web2py] Re: cron doesn't work

2011-02-17 Thread Massimo Di Pierro
if apache manages start and stop of web2py threads you cannot use cron inside apache. This does not mean you cannot use web2py cron. You just have to start a web2py instance manually: nohup web2py.py -i 127.0.0.1 -p 8000 On Feb 16, 9:19 am, LightOfMooN vladsale...@yandex.ru wrote: Hello I

[web2py] Re: cron doesn't work

2011-02-17 Thread LightOfMooN
nohup web2py.py -i 127.0.0.1 -p 8000 raises error: nohup: cannot run comand 'web2py.py': No such file or directory. ofc, I try to run it in web2py catalog. On 17 фев, 19:29, Massimo Di Pierro massimo.dipie...@gmail.com wrote: if apache manages start and stop of web2py threads you cannot use

[web2py] Re: cron doesn't work

2011-02-17 Thread Massimo Di Pierro
cd wherever web2py is then try this: sudo -u www-data nohup python web2py.py -i 127.0.0.1 -p 8000 On Feb 17, 9:29 am, LightOfMooN vladsale...@yandex.ru wrote: nohup web2py.py -i 127.0.0.1 -p 8000 raises error:     nohup: cannot run comand 'web2py.py': No such file or directory. ofc, I try

Re: [web2py] Re: cron doesn't work

2011-02-17 Thread Jonathan Lundell
On Feb 17, 2011, at 7:29 AM, LightOfMooN wrote: nohup web2py.py -i 127.0.0.1 -p 8000 raises error: nohup: cannot run comand 'web2py.py': No such file or directory. ofc, I try to run it in web2py catalog. Try either: nohup ./web2py.py ... or: python web2py.py ... On 17 фев, 19:29,

[web2py] Re: cron doesn't work

2011-02-17 Thread LightOfMooN
if it runs with python web2py.py -i 127.0.0.1 -p 8000 it works fine at once, and after minute: Exception in thread Thread-15: Traceback (most recent call last): File /usr/lib/python2.6/threading.py, line 532, in __bootstrap_inner self.run() File /home/www-data/web2py/gluon/newcron.py,

[web2py] Re: cron doesn't work

2011-02-17 Thread Massimo Di Pierro
How much memory do you have? can you check with top memory consumption? Do you cron jobs take long time? On Feb 17, 10:45 am, LightOfMooN vladsale...@yandex.ru wrote: if it runs with python web2py.py -i 127.0.0.1 -p 8000 it works fine at once, and after minute: Exception in thread Thread-15:

Re: [web2py] Re: cron doesn't work

2011-02-17 Thread Jonathan Lundell
On Feb 17, 2011, at 11:24 AM, Massimo Di Pierro wrote: How much memory do you have? can you check with top memory consumption? Do you cron jobs take long time? Could be a recursion problem, too. On Feb 17, 10:45 am, LightOfMooN vladsale...@yandex.ru wrote: if it runs with python

[web2py] Re: cron doesn't work

2011-02-17 Thread LightOfMooN
I have VDS with 256mb, and all is used Seems it's too low. On 18 фев, 00:24, Massimo Di Pierro massimo.dipie...@gmail.com wrote: How much memory do you have? can you check with top memory consumption? Do you cron jobs take long time? On Feb 17, 10:45 am, LightOfMooN vladsale...@yandex.ru

[web2py] Re: cron doesn't work

2011-02-17 Thread pbreit
I would suggest doing something simple to at least confirm that it is working OK. For example, updating a timestamp in your database every n minutes.

[web2py] Re: cron doesn't work

2011-02-17 Thread LightOfMooN
function is very simple. Just updates 1 row per every minute: def test(): shop = db(db.shops.id==1).select().first() shop.update_record(deletedate=request.now) db.commit() return 'done' On 18 фев, 00:56, pbreit pbreitenb...@gmail.com wrote: I would suggest doing something simple

[web2py] Re: cron doesn't work

2011-02-17 Thread pbreit
Try putting in a more complete path such as: *applications/myapp/cron/test

[web2py] Re: cron doesn't work

2011-02-17 Thread LightOfMooN
It doesn't work. If I write in crontab: */1 * * * * root *applications/rushops/cron/test It rises an error: Invalid application name: rushops/applications/rushops/cron/test On 18 фев, 02:08, pbreit pbreitenb...@gmail.com wrote: Try putting in a more complete path such as:

[web2py] Re: cron doesn't work

2011-02-17 Thread pbreit
Ah, ok. Looks like it is probably following a route. Sorry about that. So if you just call the function in a browser it works fine? But the cron doesn't seem to trigger the function? I assume you've restarted web2py?

[web2py] Re: cron doesn't work

2011-02-16 Thread LightOfMooN
How to check, is the cron working? If i start web2py with command line: python web2py.py, Cron runs my function once, and after minute prints error: cannot allocate memory On 16 фев, 20:19, LightOfMooN vladsale...@yandex.ru wrote: Hello I have web2py installed with setup-web2py-ubuntu.sh It

[web2py] Re: CRON doesn't work

2010-11-10 Thread Jonas Rundberg
Hi Sverre, I have the exact same issue. (Running web2py 1.87.3) Did you manage to get to work? / jonas On Nov 4, 11:10 am, Sverre sverreodeg...@gmail.com wrote: My cron tab looking like this #crontab */2 * * * *     root  *sys/test_cron @hourly          root  

[web2py] Re: CRON doesn't work

2010-11-10 Thread mdipierro
Please try the web2py nighlty built. On Nov 10, 3:48 pm, Jonas Rundberg jo...@rundberg.com wrote: Hi Sverre, I have the exact same issue. (Running web2py 1.87.3) Did you manage to get to work? / jonas On Nov 4, 11:10 am, Sverre sverreodeg...@gmail.com wrote: My cron tab looking like

[web2py] Re: CRON doesn't work

2010-11-04 Thread mdipierro
You can have a function but the script must call it: from time import ctime def test_cron(): db.dbg.insert(dbgmsg=ctime()) db.commit() return ready test_cron() # On Nov 4, 10:24 am, Vinicius Assef vinicius...@gmail.com wrote: Sverre, I think you must use your own application