<?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 -f now in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/at-f-now/m-p/2659175#M47803</link>
    <description>Well, &lt;BR /&gt;The machine does not lie.&lt;BR /&gt;It show a job number amd time,&lt;BR /&gt;but I never saw the job running.&lt;BR /&gt;I put another catch to a log at the top of the script and found is is being called.&lt;BR /&gt;Now I need to debug why it dies before writing to any other log file when it runs standalone fine.&lt;BR /&gt;&lt;BR /&gt;Thanks for all the input.&lt;BR /&gt;&lt;BR /&gt;dl</description>
    <pubDate>Tue, 05 Feb 2002 21:08:48 GMT</pubDate>
    <dc:creator>Dave La Mar</dc:creator>
    <dc:date>2002-02-05T21:08:48Z</dc:date>
    <item>
      <title>at -f now</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/at-f-now/m-p/2659166#M47794</link>
      <description>I have two scripts in the same directory.&lt;BR /&gt;From a mainframe, or manually, I call a script that&lt;BR /&gt;performs:&lt;BR /&gt;at -f /path/filename now&lt;BR /&gt;at -f /path/filename2 now&lt;BR /&gt;Filename executes, filename2 does not.&lt;BR /&gt;Executing the calling script manually, I see an at job and job id for both, but only filname executes.&lt;BR /&gt;I can manually execute filename2.&lt;BR /&gt;I think I need another set of eyes.&lt;BR /&gt;Thanks for any input.&lt;BR /&gt;dl</description>
      <pubDate>Tue, 05 Feb 2002 19:18:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/at-f-now/m-p/2659166#M47794</guid>
      <dc:creator>Dave La Mar</dc:creator>
      <dc:date>2002-02-05T19:18:55Z</dc:date>
    </item>
    <item>
      <title>Re: at -f now</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/at-f-now/m-p/2659167#M47795</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;This almost always is a result of the sparse environment of cron/at. You probably are missing either a PATH or some other needed environment variable that is setup when you run interactively but not from at.&lt;BR /&gt;</description>
      <pubDate>Tue, 05 Feb 2002 19:23:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/at-f-now/m-p/2659167#M47795</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2002-02-05T19:23:46Z</dc:date>
    </item>
    <item>
      <title>Re: at -f now</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/at-f-now/m-p/2659168#M47796</link>
      <description>Clay -&lt;BR /&gt;I sourced in the .profile as suggested but still only one of the two actually runs.&lt;BR /&gt;&lt;BR /&gt;Still got blinders on....&lt;BR /&gt;dl</description>
      <pubDate>Tue, 05 Feb 2002 19:39:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/at-f-now/m-p/2659168#M47796</guid>
      <dc:creator>Dave La Mar</dc:creator>
      <dc:date>2002-02-05T19:39:57Z</dc:date>
    </item>
    <item>
      <title>Re: at -f now</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/at-f-now/m-p/2659169#M47797</link>
      <description>Like Clay said, you don't have enough in your cron/at environment to get the job done.&lt;BR /&gt;&lt;BR /&gt;To the script filename2 add this line near the top:&lt;BR /&gt;&lt;BR /&gt;env |sort &amp;gt; /tmp/env4filename2&lt;BR /&gt;&lt;BR /&gt;then try the "at" command again.&lt;BR /&gt;&lt;BR /&gt;then do this from your command line:&lt;BR /&gt;&lt;BR /&gt;env |sort &amp;gt; /tmp/env4me&lt;BR /&gt;&lt;BR /&gt;then do a :&lt;BR /&gt;&lt;BR /&gt;diff -w /tmp/env4me /tmp/env4filename2 | more&lt;BR /&gt;&lt;BR /&gt;Path variables are the most important, but others might be necessary.&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 05 Feb 2002 19:41:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/at-f-now/m-p/2659169#M47797</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2002-02-05T19:41:25Z</dc:date>
    </item>
    <item>
      <title>Re: at -f now</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/at-f-now/m-p/2659170#M47798</link>
      <description>The 'filename' and 'filename2' are files that simply has the script path right, not the script itself ?&lt;BR /&gt;</description>
      <pubDate>Tue, 05 Feb 2002 19:42:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/at-f-now/m-p/2659170#M47798</guid>
      <dc:creator>S.K. Chan</dc:creator>
      <dc:date>2002-02-05T19:42:52Z</dc:date>
    </item>
    <item>
      <title>Re: at -f now</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/at-f-now/m-p/2659171#M47799</link>
      <description>You can also log out information during the script to a log file. This way you can see that the script actually starts and what steps it gets to. I usally do something like echo "Starting script2 at `date`" &amp;gt;&amp;gt; $LOG&lt;BR /&gt;&lt;BR /&gt;echo "Starting step1 for script2" &amp;gt;&amp;gt; $LOG&lt;BR /&gt;&lt;BR /&gt;check return status maybe then echo success or failure.&lt;BR /&gt;&lt;BR /&gt;if [ $? = 0 ]&lt;BR /&gt;then&lt;BR /&gt;    echo "Step1 successful." &amp;gt;&amp;gt; $LOG&lt;BR /&gt;else&lt;BR /&gt;    echo "Step1 failed". &amp;gt;&amp;gt; $LOG&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;I hope this helps&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 05 Feb 2002 19:52:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/at-f-now/m-p/2659171#M47799</guid>
      <dc:creator>Krishna Prasad</dc:creator>
      <dc:date>2002-02-05T19:52:42Z</dc:date>
    </item>
    <item>
      <title>Re: at -f now</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/at-f-now/m-p/2659172#M47800</link>
      <description>Hi Dave:&lt;BR /&gt;&lt;BR /&gt;I did not say source your .profile. That is almost always a bad idea unless you have all the interactive or tty stuff if'ed out.&lt;BR /&gt;</description>
      <pubDate>Tue, 05 Feb 2002 19:56:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/at-f-now/m-p/2659172#M47800</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2002-02-05T19:56:30Z</dc:date>
    </item>
    <item>
      <title>Re: at -f now</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/at-f-now/m-p/2659173#M47801</link>
      <description>Hi Dave,&lt;BR /&gt;&lt;BR /&gt;When you say filename2 doesn't run, do you mean the at job doesn't run?  Or do you mean the at job does run but filename2 doesn't?&lt;BR /&gt;&lt;BR /&gt;Check /var/adm/cron/log to verify the at job ran.  You should see something like:&lt;BR /&gt;&amp;gt;  CMD: 1012939331.a&lt;BR /&gt;&amp;gt;  root 329 a Tue Feb  5 15:02:11 EST 2002&lt;BR /&gt;&amp;lt;  root 329 a Tue Feb  5 15:02:11 EST 2002&lt;BR /&gt;&lt;BR /&gt;Do you redirect the output from filename2?  If not, do you get a mail message from "at" for filename2?  If you do redirect the output, does the output file get created / updated?&lt;BR /&gt;&lt;BR /&gt;Darrell</description>
      <pubDate>Tue, 05 Feb 2002 20:04:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/at-f-now/m-p/2659173#M47801</guid>
      <dc:creator>Darrell Allen</dc:creator>
      <dc:date>2002-02-05T20:04:05Z</dc:date>
    </item>
    <item>
      <title>Re: at -f now</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/at-f-now/m-p/2659174#M47802</link>
      <description>The env differences were variables I was setting in the script that performs the &lt;BR /&gt;at -f /../.. now.&lt;BR /&gt;I have hardcoded the entire path instead of using variables and still no execution.&lt;BR /&gt;I have enough checks and logging in the script being called to know it is not running or has not run.&lt;BR /&gt;Quite simply - (sure easy for you to say) &lt;BR /&gt;&lt;BR /&gt;SCRIPT_AT performs&lt;BR /&gt;at -f /path_to/script_1 now&lt;BR /&gt;at -f /path_to/script_2 now&lt;BR /&gt;&lt;BR /&gt;Issue both commands from the &lt;BR /&gt;command line and only script_1&lt;BR /&gt;runs.&lt;BR /&gt;Issue /path_to/sctipt_2 from the command line and it executes.&lt;BR /&gt;&lt;BR /&gt;Bridle's getting tight....&lt;BR /&gt;d</description>
      <pubDate>Tue, 05 Feb 2002 20:05:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/at-f-now/m-p/2659174#M47802</guid>
      <dc:creator>Dave La Mar</dc:creator>
      <dc:date>2002-02-05T20:05:15Z</dc:date>
    </item>
    <item>
      <title>Re: at -f now</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/at-f-now/m-p/2659175#M47803</link>
      <description>Well, &lt;BR /&gt;The machine does not lie.&lt;BR /&gt;It show a job number amd time,&lt;BR /&gt;but I never saw the job running.&lt;BR /&gt;I put another catch to a log at the top of the script and found is is being called.&lt;BR /&gt;Now I need to debug why it dies before writing to any other log file when it runs standalone fine.&lt;BR /&gt;&lt;BR /&gt;Thanks for all the input.&lt;BR /&gt;&lt;BR /&gt;dl</description>
      <pubDate>Tue, 05 Feb 2002 21:08:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/at-f-now/m-p/2659175#M47803</guid>
      <dc:creator>Dave La Mar</dc:creator>
      <dc:date>2002-02-05T21:08:48Z</dc:date>
    </item>
    <item>
      <title>Re: at -f now</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/at-f-now/m-p/2659176#M47804</link>
      <description>Hi Dave:&lt;BR /&gt;&lt;BR /&gt;Do you have 'read' statements (from stdin) in your script?  If so, and you are executing the script unconditionally (i.e. without testing whether or not it is interacive), you may get unexpected actions.  Is this the case?&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 05 Feb 2002 22:02:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/at-f-now/m-p/2659176#M47804</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2002-02-05T22:02:39Z</dc:date>
    </item>
    <item>
      <title>Re: at -f now</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/at-f-now/m-p/2659177#M47805</link>
      <description>James -&lt;BR /&gt;Nothing interactive. Thanks for the suggestion.&lt;BR /&gt;I am still stepping through each line of code to see where it may be exiting or failing when not run from the command line.&lt;BR /&gt;dl</description>
      <pubDate>Tue, 05 Feb 2002 22:19:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/at-f-now/m-p/2659177#M47805</guid>
      <dc:creator>Dave La Mar</dc:creator>
      <dc:date>2002-02-05T22:19:46Z</dc:date>
    </item>
    <item>
      <title>Re: at -f now</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/at-f-now/m-p/2659178#M47806</link>
      <description>Found the problem in a variable in the script to be executed. It was picking up the shell from the at command for the variable value.&lt;BR /&gt;Hardcoded it in the script2 and all is well.&lt;BR /&gt;Thanks for all the input.&lt;BR /&gt;dl</description>
      <pubDate>Wed, 06 Feb 2002 00:06:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/at-f-now/m-p/2659178#M47806</guid>
      <dc:creator>Dave La Mar</dc:creator>
      <dc:date>2002-02-06T00:06:59Z</dc:date>
    </item>
  </channel>
</rss>

