Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 1762 invoked from network); 26 Jul 2010 21:10:28 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 26 Jul 2010 21:10:28 -0000 Received: (qmail 79163 invoked by uid 500); 26 Jul 2010 21:10:27 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 78995 invoked by uid 500); 26 Jul 2010 21:10:26 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 78987 invoked by uid 99); 26 Jul 2010 21:10:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Jul 2010 21:10:26 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of sivang@gmail.com designates 209.85.213.180 as permitted sender) Received: from [209.85.213.180] (HELO mail-yx0-f180.google.com) (209.85.213.180) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Jul 2010 21:10:21 +0000 Received: by yxm8 with SMTP id 8so411877yxm.11 for ; Mon, 26 Jul 2010 14:10:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:content-type:content-transfer-encoding; bh=Q60Dyyk3XprPXS2RplxqgHimsgTT60VxBMC01p7BdsY=; b=xI+tVHtr52hHi8MxVgYgb9iPDt30MhzOCqy/V9eCzivyQEiwzHUHHhIsauEZkXZLR7 dmL10AWBN1fD/S19nggzFp5iBhpxdEV3DOlX6bmfyxOC7Riov809sfQu3QrAt2FqPWvc HdpY2HxDfOJhyNL107f2R7E80qk5U+3jBl2vo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=BqfZ2zcCS/AxyvmkWaM0aPKdOGaZmVoFoFh3yp4sPRvCkpZXxeki+viNfw8DquBeEH vyxzLFhnG3b8R41N5lxXB20NoTM2oiyyyLqpmpuUFWeS0giWaQpl/pFdKnKfPnpAFb/4 QFG9qUGRPPj2x7pJMa70oDA8DcT1KPPIpYY6I= MIME-Version: 1.0 Received: by 10.150.144.13 with SMTP id r13mr10020434ybd.17.1280178600829; Mon, 26 Jul 2010 14:10:00 -0700 (PDT) Sender: sivang@gmail.com Received: by 10.231.177.194 with HTTP; Mon, 26 Jul 2010 14:10:00 -0700 (PDT) In-Reply-To: References: Date: Tue, 27 Jul 2010 00:10:00 +0300 X-Google-Sender-Auth: RjMfqYKxZYOnFmYL0hJpSmIlS6M Message-ID: Subject: Re: scheduled tasks From: Sivan Greenberg To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 wrote: > Python is a programming language, not a scheduler. (Although I'm sure the= re are scheduler libraries and things like that for Python.) What do you me= an by 'works better than cron'? Yes, if you need sub-minute precision you'l= l need to look elsewhere since cron doesn't support that, but otherwise I w= ouldn'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 o= ur CouchDB maintenance needs. > > Nils. > _nn_______________________________________ > Van: sivang@gmail.com [sivang@gmail.com] namens Sivan Greenberg [sivan@om= niqueue.com] > Verzonden: maandag 26 juli 2010 22:26 > Aan: user@couchdb.apache.org > 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 : >> I don't think so. Until there is I guess you could use an external sched= uler like cron? >> >> Nils. >> ________________________________________ >> Van: Kenneth Tyler [ken@8thfold.com] >> Verzonden: maandag 26 juli 2010 18:49 >> Aan: user@couchdb.apache.org >> 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 =A0e-mail en meegezonden bijlagen is uitslu= itend bedoeld voor gebruik door de geadresseerde en kan vertrouwelijke info= rmatie bevatten. Openbaarmaking, vermenigvuldiging, verspreiding en/of vers= trekking van deze informatie aan derden is voorbehouden aan geadresseerde. = De VPRO staat niet in voor de juiste en volledige overbrenging van de inhou= d van een verzonden e-mail, noch voor tijdige ontvangst daarvan. >> > > De informatie vervat in deze =A0e-mail en meegezonden bijlagen is uitslui= tend bedoeld voor gebruik door de geadresseerde en kan vertrouwelijke infor= matie bevatten. Openbaarmaking, vermenigvuldiging, verspreiding en/of verst= rekking van deze informatie aan derden is voorbehouden aan geadresseerde. D= e VPRO staat niet in voor de juiste en volledige overbrenging van de inhoud= van een verzonden e-mail, noch voor tijdige ontvangst daarvan. >