From owner-freebsd-stable@FreeBSD.ORG Thu Oct 9 01:17:41 2008 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 665EF106568B for ; Thu, 9 Oct 2008 01:17:41 +0000 (UTC) (envelope-from peter@wemm.org) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.175]) by mx1.freebsd.org (Postfix) with ESMTP id 473C28FC12 for ; Thu, 9 Oct 2008 01:17:41 +0000 (UTC) (envelope-from peter@wemm.org) Received: by wf-out-1314.google.com with SMTP id 24so4186567wfg.7 for ; Wed, 08 Oct 2008 18:17:40 -0700 (PDT) Received: by 10.142.212.19 with SMTP id k19mr4005907wfg.13.1223515060796; Wed, 08 Oct 2008 18:17:40 -0700 (PDT) Received: by 10.142.255.21 with HTTP; Wed, 8 Oct 2008 18:17:40 -0700 (PDT) Message-ID: Date: Wed, 8 Oct 2008 18:17:40 -0700 From: "Peter Wemm" To: "Guido Falsi" In-Reply-To: <48E75BB7.2060206@madpilot.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <884679.22561.qm@web110112.mail.gq1.yahoo.com> <48E75BB7.2060206@madpilot.net> Cc: freebsd-stable@freebsd.org, bsd24x7@yahoo.com Subject: Re: 'at now' not working as expected X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Oct 2008 01:17:41 -0000 On Sat, Oct 4, 2008 at 5:04 AM, Guido Falsi wrote: > Jeff Richards wrote: >> >> When I try to schedule something immediately with an 'at now' command it >> appears to queue up but can wait multiple minutes before actually executing. >> >> Is there something I have missed with FreeBSD's version of at? I've used >> 'at now' with AIX, Linux, and OpenBSD and it immediately executes for those >> systems. >> >> I am running FreeBSD 7.0 stable. > > atrun is launched from crontab with a 5 minute granularity. So I think that > at now can launch command with at most a 5 minutes delay. > > If this is a problem you can make atrun be launched every minute > reconfiguring the crontab and you will wait at mosta one minute. > > This is explained in the at(1) man page. > > I don't know about other systems at setup. Having a stand-alone at/atrun like this is pretty antiquated. System V cron has had an integrated 'at' since the late 80's. If somebody wanted to update our vixie-cron to integrate atrun functionality it would make my day. It shouldn't be particularly hard. The trick is to leave the nasty at(1) code alone as much as possible and just do something for atrun(8). My tolerance for hacking at(1) code was exceeded when I added hacks for 'at sunrise' and 'at sunset' support to a local version. It wasn't pretty, especially when handling things like '30 minutes before sunrise' etc. (I use this for home automation stuff) -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI6FJV "All of this is for nothing if we don't go to the stars" - JMS/B5 "If Java had true garbage collection, most programs would delete themselves upon execution." -- Robert Sewell