Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   Python scheduler (http://www.velocityreviews.com/forums/t957853-python-scheduler.html)

Rita 02-21-2013 04:04 AM

Python scheduler
 
Hello,


Here is what I am trying to do. (Currently, I am doing this in cron but i
need much more granularity). I am trying to run program every 20 secs and
loop forever. I have several of these types of processes, some should run
every 5 mins, 10 secs, 20 secs, 1 min and so forth. I was wondering what is
the best way to do this?


Also, would Greenlet do something I am asking for?



--
--- Get your facts first, then you can distort them as you please.--


rusi 02-21-2013 05:29 AM

Re: Python scheduler
 
On Feb 21, 9:04*am, Rita <rmorgan...@gmail.com> wrote:
> Hello,
>
> Here is what I am trying to do. (Currently, I am doing this in cron but i
> need much more granularity). I am trying to run program every 20 secs and
> loop forever. I have several of these types of processes, some should run
> every 5 mins, 10 secs, 20 secs, 1 min and so forth. I was wondering what is
> the best way to do this?


Erlang, which is geared for such stuff, has its own internal cron
https://github.com/erlware/erlcron with 2 sec granularity.
Not an ideal solution I guess. Anyway since you are using cron (ie
not within the python ecosystem) I am pointing this out. Then you
could use the erlang equivalent of python's os.system. In erlang its
os:cmd http://www.erlang.org/doc/man/os.html


All times are GMT. The time now is 07:54 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.