From owner-svn-src-all@FreeBSD.ORG Mon Oct 15 20:52:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EFA96185; Mon, 15 Oct 2012 20:52:30 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-oa0-f54.google.com (mail-oa0-f54.google.com [209.85.219.54]) by mx1.freebsd.org (Postfix) with ESMTP id 62C718FC14; Mon, 15 Oct 2012 20:52:30 +0000 (UTC) Received: by mail-oa0-f54.google.com with SMTP id n9so7283477oag.13 for ; Mon, 15 Oct 2012 13:52:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=b1B/oTVJYyr5tyD293cwC48JtkE9egVrw6mmcc87AYo=; b=oS11gMHiDuBPB+8LnlUtVSTt4nloeojv6q4c1REy3fGGnE2iQGqdmJuYFQetTIuQzw vedL1acANi3MKJdZLtWuHiM8EFcZnk/bh57KIHgAV5crwqhd0k1vE1HQk8SnWGU25GEF dWEq3w9XB5uw+BW6sZWn+ZihTftOKq+o4hhRe8hsEquG3XTZ2e2e5pCecMpVPySkAxqI GjbLzagF/mZhiRuoOXkh/U2TDkF2HL7n2I1i4nUk5ThrqV0iZI+4NLD+ffz50V/WlXYq 3alRRtzxW8NNrT5V6YyTz/WN5LaDHfV2fjk5iVFDu13jSjRUBL5pXBjQcSmI8YhnYsPK grpw== MIME-Version: 1.0 Received: by 10.60.170.15 with SMTP id ai15mr10593167oec.62.1350334349054; Mon, 15 Oct 2012 13:52:29 -0700 (PDT) Received: by 10.76.167.202 with HTTP; Mon, 15 Oct 2012 13:52:29 -0700 (PDT) In-Reply-To: <1350333885.1123.153.camel@revolution.hippie.lan> References: <201210150821.q9F8Lobc047576@svn.freebsd.org> <20121015202615.GJ1383@garage.freebsd.pl> <1350333885.1123.153.camel@revolution.hippie.lan> Date: Mon, 15 Oct 2012 13:52:29 -0700 Message-ID: Subject: Re: svn commit: r241576 - in head/usr.sbin/cron: cron crontab lib From: Garrett Cooper To: Ian Lepore Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, Maxim Sobolev , svn-src-all@freebsd.org, src-committers@freebsd.org, Pawel Jakub Dawidek X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Oct 2012 20:52:31 -0000 On Mon, Oct 15, 2012 at 1:44 PM, Ian Lepore wrote: > On Mon, 2012-10-15 at 22:26 +0200, Pawel Jakub Dawidek wrote: >> On Mon, Oct 15, 2012 at 08:21:50AM +0000, Maxim Sobolev wrote: >> > Author: sobomax >> > Date: Mon Oct 15 08:21:49 2012 >> > New Revision: 241576 >> > URL: http://svn.freebsd.org/changeset/base/241576 >> > >> > Log: >> > Add per-second scheduling into the cron(8). Right now it's >> > only available via the new @every_second shortcut. ENOTIME to >> > implement crontab(5) format extensions to allow more flexible >> > scheduling. >> > >> > In order to address some concerns expressed by Terry Lambert >> > while discussing the topic few years ago, about per-second cron >> > possibly causing some bad effects on /etc/crontab by stat()ing >> > it every second instead of every minute now (i.e. atime update), >> > only check that database needs to be reloaded on every 60-th >> > loop run. This should be close enough to the current behaviour. >> > >> > Add "@every_minute" shortcut while I am here. >> >> Do I read the code correctly and the cron deamon will wake up every >> second now even if @every_second is not used at all? > > It appears to, which I don't think is a bad thing at all. But the way > it waits is to wake up, do some work, and go back to sleep for an > integer 1 second. That will occasionally lead to a second in which no > wakeup happens, as the "do some work" part always takes some fraction of > a second. This is silly. It should be waking up at the lowest common denominator of time quanta, not every second; this could be determined via the crontab its managing. Thanks, -Garrett