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
* * * * * sleep 30;/usr/local/apps/web2py/applications/sipacweb/private/run
procesos.py
* * * * * sleep 40;/usr/local/apps/web2py/applications/sipacweb/private/run
procesos.py
* * * * * sleep 50;/usr/local/apps/web2py/applications/sipacweb/private/run
procesos.py

This process run every ten seconds.





On Wed, Nov 27, 2013 at 11:20 PM, Brian M bmere...@gmail.com wrote:

 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 GET request to retrieve some
 values from another server (a small server running on a microcontroller)
 and then saves those values in the database. I want to run this function
 every 30 seconds in the background.

 Thank you for the help!

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


-- 
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: 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/applications/sipacweb/private/run procesos.py 
 * * * * * sleep 
 20;/usr/local/apps/web2py/applications/sipacweb/private/run procesos.py 
 * * * * * sleep 
 30;/usr/local/apps/web2py/applications/sipacweb/private/run procesos.py 
 * * * * * sleep 
 40;/usr/local/apps/web2py/applications/sipacweb/private/run procesos.py 
 * * * * * sleep 
 50;/usr/local/apps/web2py/applications/sipacweb/private/run procesos.py 

 This process run every ten seconds.





 On Wed, Nov 27, 2013 at 11:20 PM, Brian M bmer...@gmail.com javascript:
  wrote:

 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 GET request to retrieve some 
 values from another server (a small server running on a microcontroller) 
 and then saves those values in the database. I want to run this function 
 every 30 seconds in the background. 

 Thank you for the help!

  -- 
 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 javascript:.
 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: 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 Novembro de 2013 20:55:16 UTC, melmg escreveu:

 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 GET request to retrieve some 
 values from another server (a small server running on a microcontroller) 
 and then saves those values in the database. I want to run this function 
 every 30 seconds in the background. 

 Thank you for the help!


-- 
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: 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 GET request to retrieve some 
 values from another server (a small server running on a microcontroller) 
 and then saves those values in the database. I want to run this function 
 every 30 seconds in the background. 

 Thank you for the help!


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