Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Oct 2008 18:17:40 -0700
From:      "Peter Wemm" <peter@wemm.org>
To:        "Guido Falsi" <mad@madpilot.net>
Cc:        freebsd-stable@freebsd.org, bsd24x7@yahoo.com
Subject:   Re: 'at now' not working as expected
Message-ID:  <e7db6d980810081817g6673b593pf9bb7e940562a340@mail.gmail.com>
In-Reply-To: <48E75BB7.2060206@madpilot.net>
References:  <884679.22561.qm@web110112.mail.gq1.yahoo.com> <48E75BB7.2060206@madpilot.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Oct 4, 2008 at 5:04 AM, Guido Falsi <mad@madpilot.net> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?e7db6d980810081817g6673b593pf9bb7e940562a340>