<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: at command in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/at-command/m-p/2524005#M878673</link>
    <description>Leslie:&lt;BR /&gt;&lt;BR /&gt;I think the "anomoies" have to do with when stdin is closed and with .  From the man pages for 'remsh':&lt;BR /&gt;&lt;BR /&gt;/begin_quote/&lt;BR /&gt;&lt;BR /&gt;By default, remsh reads its standard input and sends it to the remote command because remsh has no way to determine whether the remote&lt;BR /&gt;command requires input.  The -n option redirects standard input to remsh from /dev/null.  This is useful when running a shell script containing a remsh command, since otherwise remsh may use input not intended for it. The -n option is also useful when running remsh in the background from a job control shell, /usr/bin/csh or /usr/bin/ksh. Otherwise, remsh stops and waits for input from the terminal keyboard for the remote command.  /usr/bin/sh automatically redirects its input from /dev/null when jobs are run in the background.&lt;BR /&gt;&lt;BR /&gt;/end_quote/&lt;BR /&gt;&lt;BR /&gt;...and from 'man at':&lt;BR /&gt;&lt;BR /&gt;/begin_quote/&lt;BR /&gt;&lt;BR /&gt;You can enter commands into a job...From the keyboard on separate lines immediately after the at or batch command line, followed by the currently defined eof (end-of-file) character to end the input.&lt;BR /&gt;&lt;BR /&gt;/end_quote/&lt;BR /&gt;&lt;BR /&gt;Does this help?&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
    <pubDate>Thu, 03 May 2001 13:16:07 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2001-05-03T13:16:07Z</dc:date>
    <item>
      <title>at command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/at-command/m-p/2523998#M878666</link>
      <description />
      <pubDate>Wed, 02 May 2001 16:38:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/at-command/m-p/2523998#M878666</guid>
      <dc:creator>Leslie Chaim</dc:creator>
      <dc:date>2001-05-02T16:38:26Z</dc:date>
    </item>
    <item>
      <title>Re: at command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/at-command/m-p/2523999#M878667</link>
      <description>Sorry I hit the enter key too soon:)&lt;BR /&gt;&lt;BR /&gt;Well, I was able to 'solve' my problem but I still have some questions I would like to clear.&lt;BR /&gt;&lt;BR /&gt;First let me outline what the script does:&lt;BR /&gt;It starts on machine A collects some data&lt;BR /&gt;then 'remsh' to machine B and collects some more data then it 'remsh' to machine C&lt;BR /&gt;followed by some other chores on machine A.&lt;BR /&gt;&lt;BR /&gt;When I run the job without the 'at' command it runs fine. However if I start it with the at command it does not work if I start it as follows:&lt;BR /&gt;&lt;BR /&gt;at now &amp;lt; driver.sh&lt;BR /&gt;&lt;BR /&gt;The above fails after completing on machine B the job just stops. However if I start the job as follows:&lt;BR /&gt;&lt;BR /&gt;at now&lt;BR /&gt;driver.sh&lt;BR /&gt;Ctrl D&lt;BR /&gt;&lt;BR /&gt;This works fine. A small wrapper does the job as well.&lt;BR /&gt;&lt;BR /&gt;Why does the 'driver.sh' stop after completing it's work on Machine B when using input redirection to the 'at' command.&lt;BR /&gt;&lt;BR /&gt;I checked the spooler by doing at -d jobid, and after removing all of the environment stuff , a ?diff? to the original is successful.&lt;BR /&gt;&lt;BR /&gt;Just looking for an explanation!&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Leslie</description>
      <pubDate>Wed, 02 May 2001 16:58:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/at-command/m-p/2523999#M878667</guid>
      <dc:creator>Leslie Chaim</dc:creator>
      <dc:date>2001-05-02T16:58:34Z</dc:date>
    </item>
    <item>
      <title>Re: at command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/at-command/m-p/2524000#M878668</link>
      <description>Things that work for us are:&lt;BR /&gt;cat script|at now&lt;BR /&gt;at now -f script&lt;BR /&gt;&lt;BR /&gt;In the case of &lt;BR /&gt;at now&amp;lt; script&lt;BR /&gt;It would appear that the pipe gets broken.</description>
      <pubDate>Thu, 03 May 2001 12:34:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/at-command/m-p/2524000#M878668</guid>
      <dc:creator>John Bolene</dc:creator>
      <dc:date>2001-05-03T12:34:11Z</dc:date>
    </item>
    <item>
      <title>Re: at command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/at-command/m-p/2524001#M878669</link>
      <description>Leslie, normally you need to specify the file with '-f' flag. If you specify '&amp;lt;' maybe it doesn't read it's contents.&lt;BR /&gt;When I run something with the at, I do it as follows: at -f &lt;FILE&gt; -t &lt;TIME&gt;&lt;/TIME&gt;&lt;/FILE&gt;</description>
      <pubDate>Thu, 03 May 2001 12:43:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/at-command/m-p/2524001#M878669</guid>
      <dc:creator>Pedro Sousa</dc:creator>
      <dc:date>2001-05-03T12:43:04Z</dc:date>
    </item>
    <item>
      <title>Re: at command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/at-command/m-p/2524002#M878670</link>
      <description>I guess the -f option may be more elegent, nevertheless, reading from stdin should be no problem.&lt;BR /&gt;&lt;BR /&gt;if 'cat job | at now' works why sould it differ from 'at now &amp;lt; job'? Also, what do yo0u mean by a broken pipe?</description>
      <pubDate>Thu, 03 May 2001 12:53:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/at-command/m-p/2524002#M878670</guid>
      <dc:creator>Leslie Chaim</dc:creator>
      <dc:date>2001-05-03T12:53:08Z</dc:date>
    </item>
    <item>
      <title>Re: at command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/at-command/m-p/2524003#M878671</link>
      <description>Since you submit the job to be partially run on another machine, the at command may not have read all the file to be submitted.&lt;BR /&gt;&lt;BR /&gt;When it comes time to read more, the job has already been sent to the other machine with remsh.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 03 May 2001 13:03:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/at-command/m-p/2524003#M878671</guid>
      <dc:creator>John Bolene</dc:creator>
      <dc:date>2001-05-03T13:03:28Z</dc:date>
    </item>
    <item>
      <title>Re: at command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/at-command/m-p/2524004#M878672</link>
      <description>Sorry. You're completely right. it works fine for me...&lt;BR /&gt;so, it's very strange. Maybe it has to do with the shell? Just a thought</description>
      <pubDate>Thu, 03 May 2001 13:12:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/at-command/m-p/2524004#M878672</guid>
      <dc:creator>Pedro Sousa</dc:creator>
      <dc:date>2001-05-03T13:12:05Z</dc:date>
    </item>
    <item>
      <title>Re: at command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/at-command/m-p/2524005#M878673</link>
      <description>Leslie:&lt;BR /&gt;&lt;BR /&gt;I think the "anomoies" have to do with when stdin is closed and with .  From the man pages for 'remsh':&lt;BR /&gt;&lt;BR /&gt;/begin_quote/&lt;BR /&gt;&lt;BR /&gt;By default, remsh reads its standard input and sends it to the remote command because remsh has no way to determine whether the remote&lt;BR /&gt;command requires input.  The -n option redirects standard input to remsh from /dev/null.  This is useful when running a shell script containing a remsh command, since otherwise remsh may use input not intended for it. The -n option is also useful when running remsh in the background from a job control shell, /usr/bin/csh or /usr/bin/ksh. Otherwise, remsh stops and waits for input from the terminal keyboard for the remote command.  /usr/bin/sh automatically redirects its input from /dev/null when jobs are run in the background.&lt;BR /&gt;&lt;BR /&gt;/end_quote/&lt;BR /&gt;&lt;BR /&gt;...and from 'man at':&lt;BR /&gt;&lt;BR /&gt;/begin_quote/&lt;BR /&gt;&lt;BR /&gt;You can enter commands into a job...From the keyboard on separate lines immediately after the at or batch command line, followed by the currently defined eof (end-of-file) character to end the input.&lt;BR /&gt;&lt;BR /&gt;/end_quote/&lt;BR /&gt;&lt;BR /&gt;Does this help?&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 03 May 2001 13:16:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/at-command/m-p/2524005#M878673</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2001-05-03T13:16:07Z</dc:date>
    </item>
    <item>
      <title>Re: at command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/at-command/m-p/2524006#M878674</link>
      <description>echo "sh $HOME/jobs/weekly-run" | at 1900 thursday next week &lt;BR /&gt;</description>
      <pubDate>Thu, 03 May 2001 13:41:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/at-command/m-p/2524006#M878674</guid>
      <dc:creator>Vincenzo Restuccia</dc:creator>
      <dc:date>2001-05-03T13:41:56Z</dc:date>
    </item>
    <item>
      <title>Re: at command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/at-command/m-p/2524007#M878675</link>
      <description>at now &amp;lt; script&lt;BR /&gt;'at' command taking i/p from script.&lt;BR /&gt; "at now script"  should work</description>
      <pubDate>Fri, 04 May 2001 09:20:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/at-command/m-p/2524007#M878675</guid>
      <dc:creator>Ravi_8</dc:creator>
      <dc:date>2001-05-04T09:20:57Z</dc:date>
    </item>
    <item>
      <title>Re: at command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/at-command/m-p/2524008#M878676</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;This is pretty interesting problem.&lt;BR /&gt;I've made some experiments, that I'd like to summarize:&lt;BR /&gt;&lt;BR /&gt;0. First of all to adopt some assumptions.&lt;BR /&gt;In the file driver.sh there are a few remsh commands, as for example:&lt;BR /&gt;&lt;BR /&gt;remsh hostA cmd ...&lt;BR /&gt;remsh hostB cmd ...&lt;BR /&gt;remsh hostC cmd ...&lt;BR /&gt;&lt;BR /&gt;1. James seems to be very close to the right explanation. &lt;BR /&gt;  Being executed the first command wait for sth from STDIN.&lt;BR /&gt;&lt;BR /&gt;2. If we try to run directly (without file driver.sh) &lt;BR /&gt;&lt;BR /&gt;at now&lt;BR /&gt;remsh hostA cmd ...&lt;BR /&gt;remsh hostB cmd ...&lt;BR /&gt;remsh hostC cmd ..&lt;BR /&gt;^d&lt;BR /&gt;&lt;BR /&gt;we observe the same behaviour as when running&lt;BR /&gt;at now &amp;lt; driver.sh&lt;BR /&gt;&lt;BR /&gt;only first command is executed. I assumed that this is related to executing these commands in background.&lt;BR /&gt;&lt;BR /&gt;3. So I prepared a script with these commands in it, and when this script is run in the foreground everything is OK, whereas running this script in background (script.sh &amp;amp;)&lt;BR /&gt;it resulted as in running via at command. Only first command was executed. Furthermore I noticed running jobs  commans, the result was as below.&lt;BR /&gt;&lt;BR /&gt;[1] + Stopped (SIGTTIN) &lt;BR /&gt;&lt;BR /&gt;man 5 signal&lt;BR /&gt;&lt;BR /&gt;SIGTTIN means Background process attempting read.&lt;BR /&gt;&lt;BR /&gt;4. At the next step I added to my script &lt;BR /&gt;&lt;BR /&gt;trap '' 27&lt;BR /&gt;&lt;BR /&gt;as the first line. Then this script when run in background was running correctly, i.e. all remsh commands have been executed.&lt;BR /&gt;&lt;BR /&gt;Unfortunately adding trap command as the first command in the at command does not help. &lt;BR /&gt;So this can be further investigated.&lt;BR /&gt;&lt;BR /&gt;Hope this help a little in explanation.&lt;BR /&gt;&lt;BR /&gt;Rgds.&lt;BR /&gt;</description>
      <pubDate>Fri, 04 May 2001 18:09:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/at-command/m-p/2524008#M878676</guid>
      <dc:creator>Wieslaw Krajewski</dc:creator>
      <dc:date>2001-05-04T18:09:02Z</dc:date>
    </item>
  </channel>
</rss>

