<?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: problem in crontab execution in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-in-crontab-execution/m-p/3317950#M186901</link>
    <description>Sorry I missed the point, I didnt realised you set off independant jobs =&amp;gt; shells&lt;BR /&gt;&lt;BR /&gt;I doubt you finding an easy solution...&lt;BR /&gt;&lt;BR /&gt;Good luck&lt;BR /&gt;Victor</description>
    <pubDate>Tue, 29 Jun 2004 07:31:21 GMT</pubDate>
    <dc:creator>Victor BERRIDGE</dc:creator>
    <dc:date>2004-06-29T07:31:21Z</dc:date>
    <item>
      <title>problem in crontab execution</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-in-crontab-execution/m-p/3317947#M186898</link>
      <description>hi all,&lt;BR /&gt;&lt;BR /&gt;i have a problem in executing crontab.&lt;BR /&gt;&lt;BR /&gt;i need to set value for a variable before executing my command in crontab. i did the following in a seperate file (setenv.sh) to do the same. Content of the file (setenv.sh) is as follows&lt;BR /&gt;&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;export SW_PLATFORM=sol&lt;BR /&gt;&lt;BR /&gt;my crontab will execute this file (setenv.sh) first and then exectue my command which use this variable to execute. But when i execute the command, value of SW_PLATFORM is blank. I also tried to print the value in my crontab. It also printed blank.&lt;BR /&gt;How do i set the value of this variable so as my command can able to access the same ?&lt;BR /&gt;&lt;BR /&gt;my crontab looks like this&lt;BR /&gt;&lt;BR /&gt;25 17 * * * echo $PATH 1&amp;gt;/dev/pts/52&lt;BR /&gt;25 17 * * * /export/home/dawood/setenv.sh 1&amp;gt;/dev/pts/52&lt;BR /&gt;25 17 * * * echo $SW_PLATFORM 1&amp;gt;/dev/pts/52&lt;BR /&gt;25 17 * * * /opt/softwire/develop/scripts/sw_admin runregression -proj  cartridges -file cartridges/release/generic/scripts/sw_night -m -f  -s[cartridges]soapSL.deps&lt;BR /&gt;&lt;BR /&gt;Thanks for the help.&lt;BR /&gt;&lt;BR /&gt;Dawood&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 29 Jun 2004 07:19:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-in-crontab-execution/m-p/3317947#M186898</guid>
      <dc:creator>dawood_2</dc:creator>
      <dc:date>2004-06-29T07:19:13Z</dc:date>
    </item>
    <item>
      <title>Re: problem in crontab execution</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-in-crontab-execution/m-p/3317948#M186899</link>
      <description>Those four commands will run completely independantly of each other, and under different environments, therefore this will not work.  You can do something like this: -&lt;BR /&gt;&lt;BR /&gt;25 17 * * * ( export SW_PLATFORM=sol ; /opt/softwire/develop/scripts/sw_admin runregression -proj cartridges -file cartridges/release/generic/scripts/sw_night -m -f -s[cartridges]soapSL.deps )&lt;BR /&gt;&lt;BR /&gt;or&lt;BR /&gt;&lt;BR /&gt;25 17 * * * ( . /export/home/dawood/setenv.sh ; /opt/softwire/develop/scripts/sw_admin runregression -proj cartridges -file cartridges/release/generic/scripts/sw_night -m -f -s[cartridges]soapSL.deps )&lt;BR /&gt;&lt;BR /&gt;Either of those should achieve what you require.</description>
      <pubDate>Tue, 29 Jun 2004 07:22:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-in-crontab-execution/m-p/3317948#M186899</guid>
      <dc:creator>Simon Hargrave</dc:creator>
      <dc:date>2004-06-29T07:22:38Z</dc:date>
    </item>
    <item>
      <title>Re: problem in crontab execution</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-in-crontab-execution/m-p/3317949#M186900</link>
      <description>Hi,&lt;BR /&gt;Did you execute your setenv.sh using dot?&lt;BR /&gt;I would...&lt;BR /&gt;. setenv.sh&lt;BR /&gt;&lt;BR /&gt;Now it should work...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;All the best&lt;BR /&gt;Victor</description>
      <pubDate>Tue, 29 Jun 2004 07:23:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-in-crontab-execution/m-p/3317949#M186900</guid>
      <dc:creator>Victor BERRIDGE</dc:creator>
      <dc:date>2004-06-29T07:23:36Z</dc:date>
    </item>
    <item>
      <title>Re: problem in crontab execution</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-in-crontab-execution/m-p/3317950#M186901</link>
      <description>Sorry I missed the point, I didnt realised you set off independant jobs =&amp;gt; shells&lt;BR /&gt;&lt;BR /&gt;I doubt you finding an easy solution...&lt;BR /&gt;&lt;BR /&gt;Good luck&lt;BR /&gt;Victor</description>
      <pubDate>Tue, 29 Jun 2004 07:31:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-in-crontab-execution/m-p/3317950#M186901</guid>
      <dc:creator>Victor BERRIDGE</dc:creator>
      <dc:date>2004-06-29T07:31:21Z</dc:date>
    </item>
    <item>
      <title>Re: problem in crontab execution</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-in-crontab-execution/m-p/3317951#M186902</link>
      <description>You need to take all of this:&lt;BR /&gt;&lt;BR /&gt;echo $PATH 1&amp;gt;/dev/pts/52&lt;BR /&gt;/export/home/dawood/setenv.sh 1&amp;gt;/dev/pts/52&lt;BR /&gt;echo $SW_PLATFORM 1&amp;gt;/dev/pts/52&lt;BR /&gt;/opt/softwire/develop/scripts/sw_admin runregression -proj cartridges -file cartridges/release/generic/scripts/sw_night -m -f -s[cartridges]soapSL.deps&lt;BR /&gt;&lt;BR /&gt;And put it in a single script...then call that script from cron....&lt;BR /&gt;&lt;BR /&gt;Rgds...Geoff</description>
      <pubDate>Tue, 29 Jun 2004 07:37:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-in-crontab-execution/m-p/3317951#M186902</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2004-06-29T07:37:00Z</dc:date>
    </item>
    <item>
      <title>Re: problem in crontab execution</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-in-crontab-execution/m-p/3317952#M186903</link>
      <description>Im not sure to understand what you are doing...&lt;BR /&gt;If you want to set a variable that will be used by a job&lt;BR /&gt;Then my first reply applies  or you can put the lot in the same script&lt;BR /&gt;the script would look like:&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;export SW_PLATFORM=sol&lt;BR /&gt;export PATH=&lt;UPDATE to="" your="" needs=""&gt;&lt;BR /&gt;&lt;BR /&gt;echo $PATH 1&amp;gt;/dev/pts/52&lt;BR /&gt;echo "SET_PLATFORM: " $SW_PLATFORM 1&amp;gt;/dev/pts/52&lt;BR /&gt;&lt;BR /&gt;/opt/softwire/develop/scripts/sw_admin runregression -proj cartridges -file cartridges/release/generic/scripts/sw_night -m -f -s[cartridges]soapSL.deps&lt;BR /&gt;&lt;BR /&gt;#end&lt;BR /&gt;&lt;BR /&gt;All the best&lt;BR /&gt;Victor&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/UPDATE&gt;</description>
      <pubDate>Tue, 29 Jun 2004 07:42:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-in-crontab-execution/m-p/3317952#M186903</guid>
      <dc:creator>Victor BERRIDGE</dc:creator>
      <dc:date>2004-06-29T07:42:20Z</dc:date>
    </item>
    <item>
      <title>Re: problem in crontab execution</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-in-crontab-execution/m-p/3317953#M186904</link>
      <description>I tried the solution given and received the following error&lt;BR /&gt;---------------------------------------------&lt;BR /&gt;&lt;BR /&gt;Your "cron" job on antriksh&lt;BR /&gt;(export SW_PLATFORM=sol;echo $SW_PLATFORM 1&amp;gt;/dev/pts/52;/opt/softwire/develop/scripts/sw_admin runregression -proj cartridges -file cartridges/release/generic/scripts/sw_night -m -f  -s[psi_cartridges]soapSL.deps)&lt;BR /&gt;&lt;BR /&gt;produced the following output:&lt;BR /&gt;&lt;BR /&gt;sh: SW_PLATFORM=sol: is not an identifier&lt;BR /&gt;&lt;BR /&gt;---------------------------------------------&lt;BR /&gt;&lt;BR /&gt;is there any other way ?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Dawood&lt;BR /&gt;</description>
      <pubDate>Tue, 29 Jun 2004 07:52:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-in-crontab-execution/m-p/3317953#M186904</guid>
      <dc:creator>dawood_2</dc:creator>
      <dc:date>2004-06-29T07:52:35Z</dc:date>
    </item>
    <item>
      <title>Re: problem in crontab execution</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-in-crontab-execution/m-p/3317954#M186905</link>
      <description>What does having this entry do: -&lt;BR /&gt;&lt;BR /&gt;* * * * * (export SW_PLATFORM=sol;echo $SW_PLATFORM)&lt;BR /&gt;&lt;BR /&gt;That should work fine (I have tested this).  If that works, then the problem must lie in some way with the actual sw_admin command you are running.  Unfortunately without knowing what/how this is supposed to work I don't know what to suggest.  Only thing, perhaps your [ ] brackets are causing confusion in some way.  Is the format of that command definately correct?</description>
      <pubDate>Tue, 29 Jun 2004 07:59:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-in-crontab-execution/m-p/3317954#M186905</guid>
      <dc:creator>Simon Hargrave</dc:creator>
      <dc:date>2004-06-29T07:59:14Z</dc:date>
    </item>
    <item>
      <title>Re: problem in crontab execution</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-in-crontab-execution/m-p/3317955#M186906</link>
      <description>Thanks Guys.&lt;BR /&gt;&lt;BR /&gt;It worked. I moved all my commands into one script and executed at one stretch. &lt;BR /&gt;&lt;BR /&gt;Thanks again for your time.&lt;BR /&gt;&lt;BR /&gt;Dawood&lt;BR /&gt;</description>
      <pubDate>Wed, 30 Jun 2004 00:28:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-in-crontab-execution/m-p/3317955#M186906</guid>
      <dc:creator>dawood_2</dc:creator>
      <dc:date>2004-06-30T00:28:27Z</dc:date>
    </item>
    <item>
      <title>Re: problem in crontab execution</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-in-crontab-execution/m-p/3317956#M186907</link>
      <description>Hi Dawood.&lt;BR /&gt;What about assigning some points to the people, that helped yu solve your problems ?&lt;BR /&gt;Rgds&lt;BR /&gt;Alexander M. Ermes</description>
      <pubDate>Wed, 30 Jun 2004 00:40:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-in-crontab-execution/m-p/3317956#M186907</guid>
      <dc:creator>Alexander M. Ermes</dc:creator>
      <dc:date>2004-06-30T00:40:05Z</dc:date>
    </item>
    <item>
      <title>Re: problem in crontab execution</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/problem-in-crontab-execution/m-p/3317957#M186908</link>
      <description>Hi Alexander,&lt;BR /&gt;&lt;BR /&gt;I have already assigned points to the responders. &lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Dawood</description>
      <pubDate>Wed, 30 Jun 2004 06:48:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/problem-in-crontab-execution/m-p/3317957#M186908</guid>
      <dc:creator>dawood_2</dc:creator>
      <dc:date>2004-06-30T06:48:29Z</dc:date>
    </item>
  </channel>
</rss>

