<?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: running scripts in crontab in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/running-scripts-in-crontab/m-p/2567896#M872525</link>
    <description>Sachin is probably right about the "DISPLAY" variable, but if not, try this:&lt;BR /&gt;&lt;BR /&gt;From a root login capture your environment variables:&lt;BR /&gt;&lt;BR /&gt;env &amp;gt; /tmp/root_env&lt;BR /&gt;&lt;BR /&gt;From your crontab script, add a line like this:&lt;BR /&gt;&lt;BR /&gt;env &amp;gt;/tmp/cron_env&lt;BR /&gt;&lt;BR /&gt;Then do a "diff" and add any missing variables.</description>
    <pubDate>Tue, 21 Aug 2001 15:57:55 GMT</pubDate>
    <dc:creator>harry d brown jr</dc:creator>
    <dc:date>2001-08-21T15:57:55Z</dc:date>
    <item>
      <title>running scripts in crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-scripts-in-crontab/m-p/2567882#M872511</link>
      <description>Hi &lt;BR /&gt;&lt;BR /&gt;I am trying to run a script in crontab - when I execute the script on a command line it will work not probelm but when I schedule it in the crontab it will not work! &lt;BR /&gt;&lt;BR /&gt;I have included in the script to set the enviroment but still it will not work !! &lt;BR /&gt;&lt;BR /&gt;Any suggestions &lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;&lt;BR /&gt;HOME="/apps/program/core_bin"&lt;BR /&gt;&lt;BR /&gt;# A short wrapper script to set the TERM variable for ret.&lt;BR /&gt;# the curses front end to ret dies when TERM="".&lt;BR /&gt;&lt;BR /&gt;TERM=hpterm&lt;BR /&gt;export TERM&lt;BR /&gt;&lt;BR /&gt;program -c ret_alive_check.cmd &amp;gt; /dev/null</description>
      <pubDate>Tue, 21 Aug 2001 10:00:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-scripts-in-crontab/m-p/2567882#M872511</guid>
      <dc:creator>user_2001</dc:creator>
      <dc:date>2001-08-21T10:00:50Z</dc:date>
    </item>
    <item>
      <title>Re: running scripts in crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-scripts-in-crontab/m-p/2567883#M872512</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;It could be that you have to use the whole pathname.&lt;BR /&gt;What is the return code in /var/adm/cron/log ?</description>
      <pubDate>Tue, 21 Aug 2001 10:05:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-scripts-in-crontab/m-p/2567883#M872512</guid>
      <dc:creator>Mark van Hassel</dc:creator>
      <dc:date>2001-08-21T10:05:48Z</dc:date>
    </item>
    <item>
      <title>Re: running scripts in crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-scripts-in-crontab/m-p/2567884#M872513</link>
      <description>hi,&lt;BR /&gt;jobs executed from the crontab have a very limited environment.&lt;BR /&gt;To solve your problem you can add the full path to "program", as Mark as already mentioned, or you could define your PATH in your script.&lt;BR /&gt;good luck,&lt;BR /&gt;Thierry.</description>
      <pubDate>Tue, 21 Aug 2001 10:08:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-scripts-in-crontab/m-p/2567884#M872513</guid>
      <dc:creator>Thierry Poels_1</dc:creator>
      <dc:date>2001-08-21T10:08:51Z</dc:date>
    </item>
    <item>
      <title>Re: running scripts in crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-scripts-in-crontab/m-p/2567885#M872514</link>
      <description>Thierry hit this right on the head. You can either fully qualify your executable path names (as in /apps/program/core_bin/program -c ret_alive....), or add your "HOME" path to the "PATH" variable (export PATH=$PATH:/apps/program/core_bin).</description>
      <pubDate>Tue, 21 Aug 2001 10:18:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-scripts-in-crontab/m-p/2567885#M872514</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2001-08-21T10:18:54Z</dc:date>
    </item>
    <item>
      <title>Re: running scripts in crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-scripts-in-crontab/m-p/2567886#M872515</link>
      <description>Hi&lt;BR /&gt;   This has to do with the environment setting. &lt;BR /&gt;Include all the environment setting present in .profile in your script. &lt;BR /&gt;   Also check the cron logs in /var/adm/cron&lt;BR /&gt;&lt;BR /&gt;...BPK...</description>
      <pubDate>Tue, 21 Aug 2001 10:33:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-scripts-in-crontab/m-p/2567886#M872515</guid>
      <dc:creator>Praveen Bezawada</dc:creator>
      <dc:date>2001-08-21T10:33:38Z</dc:date>
    </item>
    <item>
      <title>Re: running scripts in crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-scripts-in-crontab/m-p/2567887#M872516</link>
      <description>okay I have added all these details about the env into the script. &lt;BR /&gt;&lt;BR /&gt;added line into crontab .. as so &lt;BR /&gt;0,5,10,15,20,25,30,35,40,45,50,55 * * * * /apps/program/core_bin/ret -c /apps&lt;BR /&gt;/program/core_bin/alive1.sh&lt;BR /&gt;&lt;BR /&gt;but still - it won't run for me !! &lt;BR /&gt;&lt;BR /&gt;Help</description>
      <pubDate>Tue, 21 Aug 2001 12:58:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-scripts-in-crontab/m-p/2567887#M872516</guid>
      <dc:creator>user_2001</dc:creator>
      <dc:date>2001-08-21T12:58:19Z</dc:date>
    </item>
    <item>
      <title>Re: running scripts in crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-scripts-in-crontab/m-p/2567888#M872517</link>
      <description>When you run this from the command line, does it work, and does the permissions include Execute? Also, is this a root cron, or another user?&lt;BR /&gt;&lt;BR /&gt;/apps/program/core_bin/ret -c /apps/program/core_bin/alive1.sh &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 21 Aug 2001 13:10:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-scripts-in-crontab/m-p/2567888#M872517</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2001-08-21T13:10:49Z</dc:date>
    </item>
    <item>
      <title>Re: running scripts in crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-scripts-in-crontab/m-p/2567889#M872518</link>
      <description>hi again,&lt;BR /&gt;did you check the user's (root?) mail?  Output from a cron job will be mail to the user, so you might find something usefull there.&lt;BR /&gt;&lt;BR /&gt;How about "alive1.sh", this script might also need some environment variables like PATH, ...&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;Thierry.</description>
      <pubDate>Tue, 21 Aug 2001 13:10:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-scripts-in-crontab/m-p/2567889#M872518</guid>
      <dc:creator>Thierry Poels_1</dc:creator>
      <dc:date>2001-08-21T13:10:55Z</dc:date>
    </item>
    <item>
      <title>Re: running scripts in crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-scripts-in-crontab/m-p/2567890#M872519</link>
      <description>Hi,&lt;BR /&gt;set TERM=hp and not to hpterm</description>
      <pubDate>Tue, 21 Aug 2001 13:39:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-scripts-in-crontab/m-p/2567890#M872519</guid>
      <dc:creator>Ravi_8</dc:creator>
      <dc:date>2001-08-21T13:39:38Z</dc:date>
    </item>
    <item>
      <title>Re: running scripts in crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-scripts-in-crontab/m-p/2567891#M872520</link>
      <description>this is now my crontab &lt;BR /&gt;&lt;BR /&gt;0,5,10,15,20,25,30,35,40,45,50,55 * * * * * /apps/program/core_bin/ret-c /apps/program/core_bin/alive1.sh&lt;BR /&gt;&lt;BR /&gt;this is now the script &lt;BR /&gt;#!/bin/sh -f&lt;BR /&gt;&lt;BR /&gt;HOME=/home/program&lt;BR /&gt;PATH=/bin:/usr/sbin:/usr/bin:/sbin:/usr/bin/X11:/usr/local/bin:/usr/lbin:/usr/uc&lt;BR /&gt;b:/usr/lbin:/etc:/usr/lib:.:/oracle8/OraHome1/bin:/apps/program/core_bin:/apps/&lt;BR /&gt;program/aim_bin&lt;BR /&gt;LOGNAME=program&lt;BR /&gt;SHELL=/bin/csh&lt;BR /&gt;TERM=hp&lt;BR /&gt;export TERM&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;ret -c ret_alive_check1.cmd &amp;gt; /dev/null&lt;BR /&gt;&lt;BR /&gt;Still will not work for me in crontab -- works fine at command line !! &lt;BR /&gt;&lt;BR /&gt;Pulling my hair out at moment !!</description>
      <pubDate>Tue, 21 Aug 2001 15:02:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-scripts-in-crontab/m-p/2567891#M872520</guid>
      <dc:creator>user_2001</dc:creator>
      <dc:date>2001-08-21T15:02:13Z</dc:date>
    </item>
    <item>
      <title>Re: running scripts in crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-scripts-in-crontab/m-p/2567892#M872521</link>
      <description>Can you do a "whereis ret" to determine if there is another program called "ret" in your path. What does "ret" do?</description>
      <pubDate>Tue, 21 Aug 2001 15:08:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-scripts-in-crontab/m-p/2567892#M872521</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2001-08-21T15:08:12Z</dc:date>
    </item>
    <item>
      <title>Re: running scripts in crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-scripts-in-crontab/m-p/2567893#M872522</link>
      <description>ret -- is a program that calls up a terminal -- like calling SAM up and then sends a message from within sam!!</description>
      <pubDate>Tue, 21 Aug 2001 15:23:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-scripts-in-crontab/m-p/2567893#M872522</guid>
      <dc:creator>user_2001</dc:creator>
      <dc:date>2001-08-21T15:23:49Z</dc:date>
    </item>
    <item>
      <title>Re: running scripts in crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-scripts-in-crontab/m-p/2567894#M872523</link>
      <description>Hi Colet,&lt;BR /&gt;Is ret a gui program?&lt;BR /&gt;&lt;BR /&gt;Sachin</description>
      <pubDate>Tue, 21 Aug 2001 15:34:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-scripts-in-crontab/m-p/2567894#M872523</guid>
      <dc:creator>Sachin Patel</dc:creator>
      <dc:date>2001-08-21T15:34:28Z</dc:date>
    </item>
    <item>
      <title>Re: running scripts in crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-scripts-in-crontab/m-p/2567895#M872524</link>
      <description>You probably have to set the DISPLAY variable in your script.</description>
      <pubDate>Tue, 21 Aug 2001 15:40:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-scripts-in-crontab/m-p/2567895#M872524</guid>
      <dc:creator>Mark van Hassel</dc:creator>
      <dc:date>2001-08-21T15:40:33Z</dc:date>
    </item>
    <item>
      <title>Re: running scripts in crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-scripts-in-crontab/m-p/2567896#M872525</link>
      <description>Sachin is probably right about the "DISPLAY" variable, but if not, try this:&lt;BR /&gt;&lt;BR /&gt;From a root login capture your environment variables:&lt;BR /&gt;&lt;BR /&gt;env &amp;gt; /tmp/root_env&lt;BR /&gt;&lt;BR /&gt;From your crontab script, add a line like this:&lt;BR /&gt;&lt;BR /&gt;env &amp;gt;/tmp/cron_env&lt;BR /&gt;&lt;BR /&gt;Then do a "diff" and add any missing variables.</description>
      <pubDate>Tue, 21 Aug 2001 15:57:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-scripts-in-crontab/m-p/2567896#M872525</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2001-08-21T15:57:55Z</dc:date>
    </item>
    <item>
      <title>Re: running scripts in crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-scripts-in-crontab/m-p/2567897#M872526</link>
      <description>No ret is not a gui program more like a command line menu options!!</description>
      <pubDate>Tue, 21 Aug 2001 16:01:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-scripts-in-crontab/m-p/2567897#M872526</guid>
      <dc:creator>user_2001</dc:creator>
      <dc:date>2001-08-21T16:01:08Z</dc:date>
    </item>
    <item>
      <title>Re: running scripts in crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-scripts-in-crontab/m-p/2567898#M872527</link>
      <description>Hi&lt;BR /&gt;use FQPN for your program rat. i.e if your executable rat is in /opt/rat/bin then in script use&lt;BR /&gt;&lt;BR /&gt;/opt/rat/bin/rat -c ?????? &amp;gt; /dev/null&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Sachin</description>
      <pubDate>Tue, 21 Aug 2001 16:27:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-scripts-in-crontab/m-p/2567898#M872527</guid>
      <dc:creator>Sachin Patel</dc:creator>
      <dc:date>2001-08-21T16:27:46Z</dc:date>
    </item>
    <item>
      <title>Re: running scripts in crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/running-scripts-in-crontab/m-p/2567899#M872528</link>
      <description>Hello Colet,&lt;BR /&gt;&lt;BR /&gt;if I read your script right, you are using the C-shell&lt;BR /&gt;from within it. Well, then it will perhaps try to be&lt;BR /&gt;"interactive" and that would need a "controlling&lt;BR /&gt;terminal" which will not be available if called from&lt;BR /&gt;"cron"... There is an option for the C-shell to NOT&lt;BR /&gt;start interactively, though, you might try that...&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;   Wodisch</description>
      <pubDate>Tue, 21 Aug 2001 22:18:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/running-scripts-in-crontab/m-p/2567899#M872528</guid>
      <dc:creator>Wodisch</dc:creator>
      <dc:date>2001-08-21T22:18:22Z</dc:date>
    </item>
  </channel>
</rss>

