RE: Using the 'at' command

"Quillen, Channon" <[email protected]> Mon, 10 Nov 2003 08:33:02 -0600
Newsgroups gmane.linux.redhat.release.psyche
Message-ID <[email protected]>
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

----=_NextPart_ST_10_23_19_Monday_November_10_2003_8516
Content-Type: text/plain

I read, and re-read, the man pages, and searched online but couldn't find an
example of what I was trying to do.  I know that I can always submit a
question to this list and get an answer.

Here is what actually worked:
#at -f /tmp/tmp$$.sh $eventTime $eventDate-$minBefore min

The at command didn't like any spaces before the "-$minBefore".
Thanks for your reply, Cameron.

-Channon 

-----Original Message-----
From: Cameron Simpson [mailto:[email protected]] 
Sent: Friday, November 07, 2003 11:31 PM
To: [email protected]
Subject: Re: Using the 'at' command

On 11:33 06 Nov 2003, Quillen, Channon <[email protected]> wrote:
| I have been successful in running the 'at' command at a later time and
date,
| however I would like to also like to be able to specify a certain number
of
| minutes less.
| 
| For example,
| This command will work: at -f /tmp/tmp1735.sh 11:27 11/06/03
| This command will not: at -f /tmp/tmp1735.sh 11:27-2 min 11/06/03

Try this:

	at -f /tmp/tmp1735.sh 11:27 11/06/03 -2min

i.e. don't drop it in the middle of the date. These things have
a sequence. Full syntax is in the file /usr/share/doc/at-3.1.8/timespec
(you may have to adjust for your version of at - the manual entry has
the appropriate string). It's clear from the syntax that you can both
add and subtract time _at_the_end_ of the spec. Snippet:

timespec        : spec_base
                | spec_base inc_or_dec
		;

And off it goes. Very readable.

Cheers,
-- 
Cameron Simpson <[email protected]> DoD#743
http://www.cskk.ezoshosting.com/cs/

With no clue of the technique, how can one hope to master the maneuver?
        - Ed Green


-- 
Psyche-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/psyche-list

----=_NextPart_ST_10_23_19_Monday_November_10_2003_8516
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; charset=3DUS-ASCII"=
>
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version 5.5.2653.12"=
>
<TITLE>RE: Using the 'at' command</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>I read, and re-read, the man pages, and searched online b=
ut couldn't find an example of what I was trying to do.&nbsp; I know that I=
 can always submit a question to this list and get an answer.</FONT></P>

<P><FONT SIZE=3D2>Here is what actually worked:</FONT>
<BR><FONT SIZE=3D2>#at -f /tmp/tmp$$.sh $eventTime $eventDate-$minBefore mi=
n</FONT>
</P>

<P><FONT SIZE=3D2>The at command didn't like any spaces before the &quot;-$=
minBefore&quot;.</FONT>
<BR><FONT SIZE=3D2>Thanks for your reply, Cameron.</FONT>
</P>

<P><FONT SIZE=3D2>-Channon </FONT>
</P>

<P><FONT SIZE=3D2>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>From: Cameron Simpson [<A HREF=3D"mailto:[email protected]">=
mailto:[email protected]</A>] </FONT>
<BR><FONT SIZE=3D2>Sent: Friday, November 07, 2003 11:31 PM</FONT>
<BR><FONT SIZE=3D2>To: [email protected]</FONT>
<BR><FONT SIZE=3D2>Subject: Re: Using the 'at' command</FONT>
</P>

<P><FONT SIZE=3D2>On 11:33 06 Nov 2003, Quillen, Channon &lt;CQuillen@txfb-=
ins.com&gt; wrote:</FONT>
<BR><FONT SIZE=3D2>| I have been successful in running the 'at' command at =
a later time and date,</FONT>
<BR><FONT SIZE=3D2>| however I would like to also like to be able to specif=
y a certain number of</FONT>
<BR><FONT SIZE=3D2>| minutes less.</FONT>
<BR><FONT SIZE=3D2>| </FONT>
<BR><FONT SIZE=3D2>| For example,</FONT>
<BR><FONT SIZE=3D2>| This command will work: at -f /tmp/tmp1735.sh 11:27 11=
/06/03</FONT>
<BR><FONT SIZE=3D2>| This command will not: at -f /tmp/tmp1735.sh 11:27-2 m=
in 11/06/03</FONT>
</P>

<P><FONT SIZE=3D2>Try this:</FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>at -f /tmp/tmp=
1735.sh 11:27 11/06/03 -2min</FONT>
</P>

<P><FONT SIZE=3D2>i.e. don't drop it in the middle of the date. These thing=
s have</FONT>
<BR><FONT SIZE=3D2>a sequence. Full syntax is in the file /usr/share/doc/at=
-3.1.8/timespec</FONT>
<BR><FONT SIZE=3D2>(you may have to adjust for your version of at - the man=
ual entry has</FONT>
<BR><FONT SIZE=3D2>the appropriate string). It's clear from the syntax that=
 you can both</FONT>
<BR><FONT SIZE=3D2>add and subtract time _at_the_end_ of the spec. Snippet:=
</FONT>
</P>

<P><FONT SIZE=3D2>timespec&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : spec=
_base</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | spec_base inc_or_dec</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp; <FONT SIZE=3D2>;</FONT>
</P>

<P><FONT SIZE=3D2>And off it goes. Very readable.</FONT>
</P>

<P><FONT SIZE=3D2>Cheers,</FONT>
<BR><FONT SIZE=3D2>-- </FONT>
<BR><FONT SIZE=3D2>Cameron Simpson &lt;[email protected]&gt; DoD#743</FONT>
<BR><FONT SIZE=3D2><A HREF=3D"http://www.cskk.ezoshosting.com/cs/" TARGET=3D=
"_blank">http://www.cskk.ezoshosting.com/cs/</A></FONT>
</P>

<P><FONT SIZE=3D2>With no clue of the technique, how can one hope to master=
 the maneuver?</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Ed Green</F=
ONT>
</P>
<BR>

<P><FONT SIZE=3D2>-- </FONT>
<BR><FONT SIZE=3D2>Psyche-list mailing list</FONT>
<BR><FONT SIZE=3D2>[email protected]</FONT>
<BR><FONT SIZE=3D2><A HREF=3D"https://www.redhat.com/mailman/listinfo/psych=
e-list" TARGET=3D"_blank">https://www.redhat.com/mailman/listinfo/psyche-li=
st</A></FONT>
</P>

</BODY>
</HTML>
----=_NextPart_ST_10_23_19_Monday_November_10_2003_8516--


-- 
Psyche-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/psyche-list