[web2py] Re: cron @reboot entry for task queue

2015-09-23 Thread Niphlod
I'd say you need to read the cron chapter of the book. The syntax is |cron_recurrence| |user| |**file_to_execute.py so, in your case, @reboot root **applications/amlpoc/private/aml_service.py On Wednesday, September 23, 2015 at 3:49:19 PM UTC+2, Blutoh wrote: > > > I have created a task queue

[web2py] Re: cron - not work?

2015-07-13 Thread Mark
This "CRON: Disabled because no file locking" error message means you didn't install pywin32 On Thursday, July 9, 2015 at 4:58:03 AM UTC-4, Dmitry Ermolaev wrote: > > > I use Windows and Apache 2.2 > > in crontab: > > #crontab > */1 * * * * root *cron/ws_run > > in controller cron.py: > if

[web2py] Re: cron - not work?

2015-07-09 Thread Massimo Di Pierro
I think he is taking about web2py cron. It is supposed to work with any implementation but we do not support it any more because we recommend using the scheduler instead. On Thursday, 9 July 2015 07:03:58 UTC-5, 黄祥 wrote: > > i think cron can only be run in *nix environment (linux, unix, mac) >

[web2py] Re: cron - not work?

2015-07-09 Thread 黄祥
i think cron can only be run in *nix environment (linux, unix, mac) best regards, stifan -- 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 thi

[web2py] Re: cron - not work?

2015-07-09 Thread Dmitry Ermolaev
I need open an some url (app/controller/function) time by time why cron not do that? why it need locking files? -- 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 Issu

[web2py] Re: Cron @reboot and socket server on web2py startup

2015-04-27 Thread tommasot
SOLVED: Not a Web2py problem,but when i kill it, the port status remain in TIME_WAIT,so another process cannot open the port again If i wait about 30 seconds after kill the process,it restart without problems Il giorno lunedì 27 aprile 2015 23:44:29 UTC+2, tommasot ha scritto: > > I want run a

[web2py] Re: Cron-like job

2015-04-14 Thread LightDot
If "periodically from the time of saving" is a must and you also need to refresh the data changes in real time, not, for example, retroactively, once per hour, then I suggest using the web2py's Scheduler. It's in the 4th chapter of the book. Otherwise a regular system's cron job would be enough.

[web2py] Re: cron job not running at all

2015-01-10 Thread Massimo Di Pierro
For something like that you have to use the unix cron. The web2py cron is only for python tasks. Anyway, cron is deprecated now that we have the scheduler. On Wednesday, 7 January 2015 18:51:48 UTC-6, SHAO MIN wrote: > > > Hello there! >> > I'm also having problem with my cron job.Basically i

[web2py] Re: cron job not running at all

2015-01-08 Thread SHAO MIN
> Hello there! > I'm also having problem with my cron job.Basically i need to set a command to let the system auto run every 1 mintue but when i try to place the code inside the crontab -e it doesn't work. the command that i need to run is : pscp root @192.168.7.2:/home/debian/Desktop/Sensor

[web2py] Re: CRON Startup Script & DB Driver

2014-07-09 Thread 'Michael Gheith' via web2py-users
It turns out that Cron didn't have access to cx_Oracle because it wasn't in the environment. Oops, should have checked that out first thing! On Wednesday, July 9, 2014 9:57:05 AM UTC-5, Michael Gheith wrote: > > Hello web2py community! > > I created a shell script that essentially checks if web2

[web2py] Re: Cron job every 30 seconds

2013-11-28 Thread Leonel Câmara
Is the time critical? Do you have control/can program the server in the microcontroller? It seems to me as this should be reversed. Instead of you polling the microcontroller, the microcontroller should be sending you new data, either when it receives it or in batches. Terça-feira, 26 de Novem

Re: [web2py] Re: Cron job every 30 seconds

2013-11-28 Thread Massimo Di Pierro
Please use the scheduler, not cron. Cron must die. On Thursday, 28 November 2013 05:22:28 UTC-6, Javier Pepe wrote: > > You can add cron job which sleep > > * * * * * sleep > 0;/usr/local/apps/web2py/applications/sipacweb/private/run procesos.py > * * * * * sleep > 10;/usr/local/apps/web2py/

Re: [web2py] Re: Cron job every 30 seconds

2013-11-28 Thread Javier Pepe
You can add cron job which sleep * * * * * sleep 0;/usr/local/apps/web2py/applications/sipacweb/private/run procesos.py * * * * * sleep 10;/usr/local/apps/web2py/applications/sipacweb/private/run procesos.py * * * * * sleep 20;/usr/local/apps/web2py/applications/sipacweb/private/run procesos.py *

[web2py] Re: Cron job every 30 seconds

2013-11-27 Thread Brian M
web2py's scheduler will let you set the repeat period in seconds so you could probably do 30 seconds that way. On Tuesday, November 26, 2013 2:55:16 PM UTC-6, melmg wrote: > > Is is possible to set up a cron job to run every 30 seconds instead of a > minute? I have a function that does an HTTP G

[web2py] Re: Cron every 5 seconds.

2012-12-22 Thread Alan Etkin
Duplicated https://groups.google.com/d/topic/web2py/eiEImsH_ZVg/discussion --

[web2py] Re: cron job not running at all

2012-12-03 Thread Massimo Di Pierro
Cron was broken. Until 1h ago (revision hg 4451). @reboot should also be fixed. The problem was a typo introduced in rev 4278. On Monday, 3 December 2012 15:39:42 UTC-6, david.waldrop wrote: > > Ok I am giving up on cron and going to try the scheduler. > One thing I am not sure of is whether or n

[web2py] Re: cron job not running at all

2012-12-03 Thread david.waldrop
Ok I am giving up on cron and going to try the scheduler. One thing I am not sure of is whether or not the scheduler worker task is started automatically by default? How can I tell if there are any worker tasks executing. In the web faction environment how can I start the worker tasks. And do so a

[web2py] Re: cron job not running at all

2012-12-02 Thread david.waldrop
> > I am still working on this with the hopes of getting it to work on my > local dev machine before deploying to production, but after reading the > forums I am very unsure of the best practice to get a simple background > task that wakes up every 10 (or n minutes) does some stuff (in my case

[web2py] Re: cron not work in 2.0.9

2012-10-19 Thread Márcio
Thanks, worked perfectly. Great work. --

[web2py] Re: cron not work in 2.0.9

2012-10-18 Thread Massimo Di Pierro
In 2.1.1 you need to use the -Y option since cron is off by default. On Thursday, 18 October 2012 16:11:55 UTC-5, Márcio wrote: > > I upgraded to version 2.1.1 and still did not work. Any idea? > In version 1.99.7 works perfect. > > Em quinta-feira, 11 de outubro de 2012 18h48min21s UTC-3, Massim

[web2py] Re: cron not work in 2.0.9

2012-10-18 Thread Márcio
I upgraded to version 2.1.1 and still did not work. Any idea? In version 1.99.7 works perfect. Em quinta-feira, 11 de outubro de 2012 18h48min21s UTC-3, Massimo Di Pierro escreveu: > > Sorry this took forever. This is now fixed. > > On Tuesday, 2 October 2012 21:51:46 UTC-5, Márcio wrote: >> >> M

[web2py] Re: Cron task help

2012-10-18 Thread Massimo Di Pierro
Since web2py 2.1. you need -Y to enable cron, it is now disabled by default. On Thursday, 18 October 2012 12:18:07 UTC-5, Mike Anson wrote: > > I would like to have posted my question right here but with I was unable > to post it perhaps due to character count of the question being +800 > > So I

[web2py] Re: cron not work in 2.0.9

2012-10-11 Thread Massimo Di Pierro
Sorry this took forever. This is now fixed. On Tuesday, 2 October 2012 21:51:46 UTC-5, Márcio wrote: > > Massimo, help please. --

[web2py] Re: cron not work in 2.0.9

2012-10-02 Thread Márcio
Massimo, help please. --

[web2py] Re: cron not work in 2.0.9

2012-09-28 Thread Márcio
Not start. --

[web2py] Re: cron not work in 2.0.9

2012-09-28 Thread Massimo Di Pierro
Is that problem that it does not start or that it does not run? On Friday, 28 September 2012 13:15:11 UTC-5, Márcio wrote: > > My cron.py file: > *****root *monitor/rastrear > > In browser the controller and function run fine. > --

[web2py] Re: cron not work in 2.0.9

2012-09-28 Thread Márcio
My cron.py file: * * * * * root *monitor/rastrear In browser the controller and function run fine. --

[web2py] Re: cron not work in 2.0.9

2012-09-28 Thread Massimo Di Pierro
can you show us some code? How do you start it? On Friday, 28 September 2012 10:07:28 UTC-5, Márcio wrote: > > Hello, I have a routine that runs from cron built in version 1.99.7, after > upgrading to 2.0.9 no more triggers cron. Anyone know? > --

[web2py] Re: Cron problems

2012-06-09 Thread Massimo Di Pierro
In trunk now. On Saturday, 9 June 2012 10:46:27 UTC-5, Jan Rozhon wrote: > > Hi, any update on this topic? I am just facing that same issue, Thanks > Michael for writing down a workaround. > > Jan. > > Dne středa, 23. května 2012 16:21:02 UTC+2 Massimo Di Pierro napsal(a): >> >> Please open a tic

[web2py] Re: Cron problems

2012-06-09 Thread Jan Rozhon
Hi, any update on this topic? I am just facing that same issue, Thanks Michael for writing down a workaround. Jan. Dne středa, 23. května 2012 16:21:02 UTC+2 Massimo Di Pierro napsal(a): > > Please open a ticket about this. cron was not designed to do this but > there is no reason it cannot do

[web2py] Re: Cron problems

2012-05-23 Thread Massimo Di Pierro
Please open a ticket about this. cron was not designed to do this but there is no reason it cannot do it. On Tuesday, 22 May 2012 22:33:57 UTC-5, Michael Toomim wrote: > > I'm finding multiple problems getting cron to start the scheduler. Here's > the cron line: > @reboot dummyuser python web

[web2py] Re: CRON tasks in Google App Engine

2012-04-20 Thread Wikus van de Merwe
Not directly. You can't execute scripts on GAE, so you would have to move the checking/sending code into a controller function and set up the GAE cron to call it periodically. However, it might be easier to use the GAE queues and to delegate e-mail sending to a background task: https://develope

Re: [web2py] Re: cron setup

2012-03-01 Thread Luciano Pacheco
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 wrote: > Luciano i removed the one * before the applications and tryed than i got > the following error :- > > > OperationalError: unab

Re: [web2py] Re: cron setup

2012-02-29 Thread Sanjeet Kumar
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 environ

Re: [web2py] Re: cron setup

2012-02-29 Thread Luciano Pacheco
On Wed, Feb 29, 2012 at 11:10 PM, Sanjeet Kumar wrote: > 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

Re: [web2py] Re: cron setup

2012-02-29 Thread Sanjeet Kumar
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 de

Re: [web2py] Re: cron setup

2012-02-28 Thread Sanjeet Kumar
Thanks Luciano i will try. On Tue, Feb 28, 2012 at 5:06 PM, Luciano Pacheco 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 applications.instore.controllers

Re: [web2py] Re: cron setup

2012-02-28 Thread Luciano Pacheco
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, F

Re: [web2py] Re: cron setup

2012-02-28 Thread Sanjeet Kumar
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 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 > > # file: ap

Re: [web2py] Re: cron setup

2012-02-28 Thread 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()

Re: [web2py] Re: cron setup

2012-02-28 Thread Sanjeet Kumar
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 wrote: > Follo

Re: [web2py] Re: cron setup

2012-02-28 Thread Luciano Pacheco
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 is

Re: [web2py] Re: cron setup

2012-02-28 Thread Sanjeet Kumar
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 wrote: > Example: > > http://movu.ca/demo/article/show/31/web2py-cron

Re: [web2py] Re: cron setup

2012-02-27 Thread Bruno Rocha
thanks Luciano! I will migrate your recipe to the new web2pyslices website. http://zerp.ly/rochacbruno Em 27/02/2012 09:16, "Luciano Pacheco" 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 PM, Sanjeet

Re: [web2py] Re: cron setup

2012-02-27 Thread Luciano Pacheco
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 wrote: > Exactly I need the examples > > > On Mon, Feb 27, 2012 at 4:56 AM, Luciano Pacheco wrote: > >> I think Sanjeet means, I example of the task. >> >> Wh

Re: [web2py] Re: cron setup

2012-02-26 Thread Sanjeet Kumar
Exactly I need the examples On Mon, Feb 27, 2012 at 4:56 AM, Luciano Pacheco 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 > function,

[web2py] Re: cron setup

2012-02-26 Thread Anthony
> > By the way, The link in web2py to cron (http://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.

Re: [web2py] Re: cron setup

2012-02-26 Thread Luciano Pacheco
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. :-) Regar

[web2py] Re: cron setup

2012-02-26 Thread Alan Etkin
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 wrote: > Can anyone give m

[web2py] Re: Cron on FluxFlex

2011-12-17 Thread John Oliva
Thanks Alan.

[web2py] Re: Cron on FluxFlex

2011-12-17 Thread Alan Etkin
The web2py book says: * hard cron: available if using the built-in web server (either directly or via Apache mod_proxy) * external cron: available if you have access to the system’s own cron service This post might help: http://getsatisfaction.com/fluxflex/topics/cant_we_use_crontab Apparently

[web2py] Re: Cron Jobs with Linode or Web2py?

2011-09-07 Thread pbreit
I think you're going to want to eventually end up using the system's cron. Struggled to figure out the best commands to put in my crontab and ended up with a smal hack: */1 * * * * wget http://localhost/cron/mail_queue >/dev/null 2>&1 That calls the function "mail_queue" in my "cron.py" control

Re: [web2py] Re: cron problem

2011-07-26 Thread Manuele Pesenti
On 26/07/2011 00:00, Rowdy wrote: Greeting. Different time zone perhaps? fetch_m_data is expected to run at 06:30, but runs at 12:30 (= +6 hours). this time a ticket is not necessary ;) the server that runs my web2py is a virtual machine, the date command gave the correct date info but I di

[web2py] Re: cron problem

2011-07-25 Thread Rowdy
Manuele Pesenti wrote: dear all, I have a strange problem with cron it seams it does not respect what I have eritten in crontab... this is my crontab: 30 6 * * * root *cron/fetch_m_data 0 7 * * * root *default/send_mail_msg 30 14 * * * root *cron/fetch_x_data 0 21 * * * root *cron/fetch_m_

Re: [web2py] Re: cron problem

2011-07-25 Thread Manuele Pesenti
On 25/07/2011 14:33, Massimo Di Pierro wrote: Please open a ticket. Does it behave better is 30 6 * and 30 14* are replaced by 0 6 * and 0 14 *? can you tell me how to open a ticket? the fact is that the same application runs correctly in my local laptop (Debian testing) and not on the produc

[web2py] Re: cron problem

2011-07-25 Thread Massimo Di Pierro
Please open a ticket. Does it behave better is 30 6 * and 30 14* are replaced by 0 6 * and 0 14 *? On Jul 25, 6:22 am, Manuele Pesenti wrote: > dear all, > I have a strange problem with cron it seams it does not respect what I > have eritten in crontab... this is my crontab: > > 30 6 * * *  root

Re: [web2py] Re: CRON or Background script?

2011-07-23 Thread Ismael Serratos
Thank you ron_m!!! That worked more than fine! On Wed, Jul 20, 2011 at 11:16 AM, ron_m wrote: > Run 2 copies of web2py, one for the script and the other for the web site. > If the database is SQLite you will end up with blocking problems if the > background task takes too long. >

Re: [web2py] Re: CRON or Background script?

2011-07-20 Thread ron_m
Run 2 copies of web2py, one for the script and the other for the web site. If the database is SQLite you will end up with blocking problems if the background task takes too long.

Re: [web2py] Re: CRON or Background script?

2011-07-19 Thread pbreit
Here is what the Book recommends: python web2py.py -S app -M -N -R applications/app/private/myscript.py

Re: [web2py] Re: CRON or Background script?

2011-07-19 Thread Ismael Serratos
OK, my script is working fine, but the problem is this, I'm launching this script: import time print "Initializing booking daemon @_@" while True: allBookings = db(db.current_bookings).select() for booking in allBookings: if booking.project != 'foo': print str(booki

Re: [web2py] Re: CRON or Background script?

2011-07-18 Thread Ismael Serratos
I tried putting it into a controller, also as a separated file into private folder On Mon, Jul 18, 2011 at 8:36 PM, pbreit wrote: > Where is this code located and how are you calling it? If it's in a > controller, you may need to call bookings() with an argument. > > Did you review this: > >

[web2py] Re: CRON or Background script?

2011-07-18 Thread pbreit
Where is this code located and how are you calling it? If it's in a controller, you may need to call bookings() with an argument. Did you review this: http://web2py.com/book/default/chapter/04?#Background-Processes-and-Task-Queues

[web2py] Re: cron "Too many open files" regression?

2011-07-06 Thread Massimo Di Pierro
This should not be a problem because cron jobs are executed in their own processes (not threads) and they should just die. Anyway, I cannot completely exclude it either. On Jul 6, 6:32 pm, ron_m wrote: > Maybe one possibility is if your code has classes with a __del__ method in > them, Massimo wo

Re: [web2py] Re: cron "Too many open files" regression?

2011-07-06 Thread ron_m
Maybe one possibility is if your code has classes with a __del__ method in them, Massimo would have better perspective on if this is a possibility. If a class with this method is involved in a circular reference the garbage collector cannot clean it up because of uncertainty of execution of the

[web2py] Re: cron "Too many open files" regression?

2011-07-06 Thread Massimo Di Pierro
Please keep us posted. Massimo On Jul 6, 9:31 am, John Duddy wrote: > It was my understanding that Python's GC frees any resources not explicitly > freed, and cron runs jobs in a try/except/finally block and rolls back any > uncommitted transactions. > > I have reproduced the issue with the thre

Re: [web2py] Re: cron "Too many open files" regression?

2011-07-06 Thread John Duddy
It was my understanding that Python's GC frees any resources not explicitly freed, and cron runs jobs in a try/except/finally block and rolls back any uncommitted transactions. I have reproduced the issue with the three running sequentially, and in every case, the logs indicate that my functions e

[web2py] Re: cron "Too many open files" regression?

2011-07-06 Thread Massimo Di Pierro
Yes that is the problem wit cron issue. If one of the processes locks a resource, cron does not know about it and keeps spawning processes as scheduled. The new processes find the resource locked and freeze of crash but use ram. This is not a bug because cron is not supposed to know what the tasks

Re: [web2py] Re: cron "Too many open files" regression?

2011-07-05 Thread ron_m
Sounds like some kind of race condition between the cron scripts because it doesn't happen every time. Is there any chance the 3 cron scripts are dependent on each other in some way such as a file passed between or sharing a database. If there is any relationship between the cron scripts would i

Re: [web2py] Re: cron "Too many open files" regression?

2011-07-05 Thread John Duddy
I have dug further, and it is definitely a cron issue. I have 3 cron tasks firing every minute, and they always completed in under 1 second. But every so often, the process lauched by web2py would seem to hang - it never executed my code (first line was logging, not executed for that process). Thes

Re: [web2py] Re: cron "Too many open files" regression?

2011-07-05 Thread John Duddy
I am seeing lots of processes (20 or so) backing up, yet as far as I can tell, they are not doing anything. I'll add some tracing to see if they are actually processing, but slowly. On Tue, Jul 5, 2011 at 12:32 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > Are you starting a lot of

[web2py] Re: cron "Too many open files" regression?

2011-07-05 Thread Massimo Di Pierro
Are you starting a lot of cron tasks that do not terminate before the next one starts? I suggest you use a background process and do not use cron. To my knowledge there is no bug but cron become unpredictable if jobs take too long. Massimo On Jul 5, 10:34 am, John Duddy wrote: > I'm getting th

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 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, you c

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

[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 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 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
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 wrote: > Not sure why but cron never worked for me... > > 0-59/1 * * * * root *admin/test > > def test(): >     mail.send('titogarr...@gmail.

[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 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 'test' > > > Nothi

Re: [web2py] Re: Cron not running/starting on windows

2011-03-10 Thread Andrew Buchan
Thanks, I think the pywin32 extensions are needed to run web2py from source on windows full stop. Either way, I have them installed. I'm working around this issue using cURL and a scheduled task, which actually suits my fine for now. On Thu, Mar 10, 2011 at 1:57 PM, villas wrote: > If you are r

[web2py] Re: Cron not running/starting on windows

2011-03-10 Thread villas
If you are running from source, I believe you needed the Mark Hammond extensions to get cron working. I didn't see this mentioned in this thread so I thought I'd post it in case it helps or gives an extra clue. Regards, David On Mar 9, 11:49 am, Andrew Buchan wrote: > Hello, > > I have web2py r

[web2py] Re: Cron not running/starting on windows

2011-03-10 Thread Andrew Buchan
I put the script statements in a function in the controller and it works fine. The Task Manager doesn't show any python.exe processes when web2py is running as a service. @ Brian, apparently cron should work https://groups.google.com/forum/#!searchin/web2py/cron$20windows/web2py/id9p6-2h8gw/sOeGt

[web2py] Re: Cron not running/starting on windows

2011-03-09 Thread Brian M
I don't think cron works when running as a Windows service - at least it didn't in the past https://groups.google.com/forum/#!searchin/web2py/windows$20cron/web2py/OX7pXEGlSGM/hkspXZWKV1gJ I ended up just using a scheduled task that used wget to fetch certain controllers I wanted to run regular

[web2py] Re: Cron not running/starting on windows

2011-03-09 Thread pbreit
Do you know if the script runs without error? What I do sometimes is put the script into controller.py and try to run it from there. My only guess at this point is perhaps there might be a permission problem writing to the "cron" directory. In your Windows Task Manager can you see that multiple

[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 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 trigger the function? I

[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 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 see

[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-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 wrote: > Try putting in a more complete path such as: > *applications/myapp/cron/test

[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
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 wrote: > I would suggest doing something simple to at least confirm t

[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
I have VDS with 256mb, and all is used Seems it's too low. On 18 фев, 00:24, Massimo Di Pierro 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 wrote: > > > > > > > > > if it runs with pytho

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 wrote: >> if it runs with python web2py.py -i 127.0.0.

[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 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: > Traceback (most

[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"

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

[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 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 web2p

[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 wrote: > if apache manages start and stop of web2py threads you cannot use cron > inside apache. Th

[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 wrote: > Hello > I have web2py installed

[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 wrote: > Have somebody know any solution for this problem? > > On 17 фев, 13:08, b0j3 wrote: > > > I tried the same on my cron (just working on it) and it look

[web2py] Re: cron doesn't work

2011-02-17 Thread LightOfMooN
Have somebody know any solution for this problem? On 17 фев, 13:08, b0j3 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. > > On 17 feb

  1   2   >