On Jul 26, 2010, at 2:28 PM, Mark J. Reed wrote:

> The "fun and ease of Python" is not at issue here.  Glad you're having
> fun programming in your favorite language, but it's not as if you can
> just do 'from scheduler import magic' and be done.
> 
> The point is, cron didn't work for you because you wanted sub-minute
> precision and automatic overlap prevention.
> For folks who don't need those things, cron is a viable solution.
> Either way, whether you're writing your own scheduler or writing the
> scripts to be run out of one, you can use whatever language you like;
> one of the goals of Couch is to be language-agnostic.  As long as you
> have JSON and HTTP libraries for it, you can even code in Fortran...
> 

This is a good way to keep a python program running and reacting to couchdb 
updates:

http://blog.fupps.com/2010/05/10/update-notifications-in-couchdb-tweeting-urgent-documents/

> 
> On Mon, Jul 26, 2010 at 5:10 PM, Sivan Greenberg <[email protected]> wrote:
>> Hi Nils,
>> 
>> I am using Python to have 2 separate background process that:
>> 1) Replication connections are working/ restart/ fix if needed
>> (including wrapper SSH tunnels).
>> 2) Conflict resolution that is triggered by the _changes feed,
>> asynchronous and parallelized.
>> 
>> I've also used CouchDBKit to manage CouchDB from Python.
>> 
>> Doing the response/fix logic in a cron triggered script proved
>> problematic for me, so I went and added my own scheduling bits, on the
>> way enabling sub-minute precision quite easily, attributing to the fun
>> and ease of Python. (Scheduling being mostly while loops with
>> configurable sleep intervals, at its simplest form, and time/date
>> based sleeps)
>> 
>> Being able to suspend interval triggered execution until a previous
>> run came back, without having to use locking or flag files and such as
>> when using cron, was a breeze.
>> 
>> I guess that is "different" not better perhaps.
>> 
>> -Sivan
>> 
>> On Mon, Jul 26, 2010 at 11:57 PM, Nils Breunese <[email protected]> wrote:
>>> Python is a programming language, not a scheduler. (Although I'm sure there 
>>> are scheduler libraries and things like that for Python.) What do you mean 
>>> by 'works better than cron'? Yes, if you need sub-minute precision you'll 
>>> need to look elsewhere since cron doesn't support that, but otherwise I 
>>> wouldn't go and write code to do what a scheduler like cron already 
>>> provides (and it's usually already running anyway).
>>> 
>>> We're actually using a Python script (using couchdbkit) run by cron for our 
>>> CouchDB maintenance needs.
>>> 
>>> Nils.
>>> _nn_______________________________________
>>> Van: [email protected] [[email protected]] namens Sivan Greenberg 
>>> [[email protected]]
>>> Verzonden: maandag 26 juli 2010 22:26
>>> Aan: [email protected]
>>> Onderwerp: Re: scheduled tasks
>>> 
>>> I am actually using python to do that in my specific project. Works
>>> better than cron and allows finer granularity of intervals.
>>> 
>>> Sivan
>>> 
>>> 2010/7/26 Nils Breunese <[email protected]>:
>>>> I don't think so. Until there is I guess you could use an external 
>>>> scheduler like cron?
>>>> 
>>>> Nils.
>>>> ________________________________________
>>>> Van: Kenneth Tyler [[email protected]]
>>>> Verzonden: maandag 26 juli 2010 18:49
>>>> Aan: [email protected]
>>>> Onderwerp: scheduled tasks
>>>> 
>>>> is there any way to run a scheduled task in couchdb?
>>>> 
>>>> i'd like to create a bunch of documents that reresent data in records
>>>> that need to be updated... without having to do the update immediately
>>>> 
>>>> thanks
>>>> 
>>>> ken tyler
>>>> 
>>>> De informatie vervat in deze  e-mail en meegezonden bijlagen is 
>>>> uitsluitend bedoeld voor gebruik door de geadresseerde en kan 
>>>> vertrouwelijke informatie bevatten. Openbaarmaking, vermenigvuldiging, 
>>>> verspreiding en/of verstrekking van deze informatie aan derden is 
>>>> voorbehouden aan geadresseerde. De VPRO staat niet in voor de juiste en 
>>>> volledige overbrenging van de inhoud van een verzonden e-mail, noch voor 
>>>> tijdige ontvangst daarvan.
>>>> 
>>> 
>>> De informatie vervat in deze  e-mail en meegezonden bijlagen is uitsluitend 
>>> bedoeld voor gebruik door de geadresseerde en kan vertrouwelijke informatie 
>>> bevatten. Openbaarmaking, vermenigvuldiging, verspreiding en/of 
>>> verstrekking van deze informatie aan derden is voorbehouden aan 
>>> geadresseerde. De VPRO staat niet in voor de juiste en volledige 
>>> overbrenging van de inhoud van een verzonden e-mail, noch voor tijdige 
>>> ontvangst daarvan.
>>> 
>> 
> 
> 
> 
> -- 
> Mark J. Reed <[email protected]>

Reply via email to