<?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: script run ok manually but failed when run as a cronjob in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script-run-ok-manually-but-failed-when-run-as-a-cronjob/m-p/4551565#M370596</link>
    <description>ls -l /root/ftp_nspay_stats.sh&lt;BR /&gt;&lt;BR /&gt;also make sure you have rwx -permissions ?</description>
    <pubDate>Thu, 17 Dec 2009 07:36:28 GMT</pubDate>
    <dc:creator>Johnson Punniyalingam</dc:creator>
    <dc:date>2009-12-17T07:36:28Z</dc:date>
    <item>
      <title>script run ok manually but failed when run as a cronjob</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-run-ok-manually-but-failed-when-run-as-a-cronjob/m-p/4551559#M370590</link>
      <description>Hi &lt;BR /&gt;&lt;BR /&gt;I write the script,ftp_stats.sh below &lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/ksh&lt;BR /&gt;&lt;BR /&gt;/usr/bin/ftp -i -n &amp;lt; ftp_stats.txt &lt;BR /&gt;-------------------------------------------&lt;BR /&gt;ftp_stats.txt is as follows&lt;BR /&gt;open IPaddress&lt;BR /&gt;user id password&lt;BR /&gt;cd dataload&lt;BR /&gt;put stats.log&lt;BR /&gt;&lt;BR /&gt;The objective is to run the job as a cron successfully.&lt;BR /&gt;&lt;BR /&gt;Please advice.&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Feng Lin&lt;BR /&gt;Please advice.</description>
      <pubDate>Thu, 17 Dec 2009 06:38:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-run-ok-manually-but-failed-when-run-as-a-cronjob/m-p/4551559#M370590</guid>
      <dc:creator>Fenglin</dc:creator>
      <dc:date>2009-12-17T06:38:40Z</dc:date>
    </item>
    <item>
      <title>Re: script run ok manually but failed when run as a cronjob</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-run-ok-manually-but-failed-when-run-as-a-cronjob/m-p/4551560#M370591</link>
      <description>Hi Fenglin,&lt;BR /&gt;&lt;BR /&gt;How do you run the script manually?&lt;BR /&gt;&lt;BR /&gt;Because the script contains "cd" command, I guess that might be a issue.&lt;BR /&gt;&lt;BR /&gt;The script containing "cd" have to be run bit differently as far as I know.</description>
      <pubDate>Thu, 17 Dec 2009 06:44:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-run-ok-manually-but-failed-when-run-as-a-cronjob/m-p/4551560#M370591</guid>
      <dc:creator>R.K. #</dc:creator>
      <dc:date>2009-12-17T06:44:38Z</dc:date>
    </item>
    <item>
      <title>Re: script run ok manually but failed when run as a cronjob</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-run-ok-manually-but-failed-when-run-as-a-cronjob/m-p/4551561#M370592</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;could you send the line from crontab ??&lt;BR /&gt;&lt;BR /&gt;mikap</description>
      <pubDate>Thu, 17 Dec 2009 06:47:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-run-ok-manually-but-failed-when-run-as-a-cronjob/m-p/4551561#M370592</guid>
      <dc:creator>Michal Kapalka (mikap)</dc:creator>
      <dc:date>2009-12-17T06:47:33Z</dc:date>
    </item>
    <item>
      <title>Re: script run ok manually but failed when run as a cronjob</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-run-ok-manually-but-failed-when-run-as-a-cronjob/m-p/4551562#M370593</link>
      <description>what doesn cron.log shows ?</description>
      <pubDate>Thu, 17 Dec 2009 06:47:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-run-ok-manually-but-failed-when-run-as-a-cronjob/m-p/4551562#M370593</guid>
      <dc:creator>Johnson Punniyalingam</dc:creator>
      <dc:date>2009-12-17T06:47:39Z</dc:date>
    </item>
    <item>
      <title>Re: script run ok manually but failed when run as a cronjob</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-run-ok-manually-but-failed-when-run-as-a-cronjob/m-p/4551563#M370594</link>
      <description>Hi All&lt;BR /&gt;&lt;BR /&gt;34 12 * * 1-5 /root/ftp_nspay_stats.sh &amp;gt; /dev/null 2&amp;gt;&amp;amp;1&lt;BR /&gt;&lt;BR /&gt;cron.log shows&lt;BR /&gt;&lt;BR /&gt;CMD: /root/ftp_stats.sh &amp;gt; /dev/null 2&amp;gt;&amp;amp;1&lt;BR /&gt;&amp;gt;  root 18598 c Thu Dec 17 12:34:00 SST 2009&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Feng Lin</description>
      <pubDate>Thu, 17 Dec 2009 07:24:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-run-ok-manually-but-failed-when-run-as-a-cronjob/m-p/4551563#M370594</guid>
      <dc:creator>Fenglin</dc:creator>
      <dc:date>2009-12-17T07:24:26Z</dc:date>
    </item>
    <item>
      <title>Re: script run ok manually but failed when run as a cronjob</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-run-ok-manually-but-failed-when-run-as-a-cronjob/m-p/4551564#M370595</link>
      <description>Why don't you remove "&amp;gt; /dev/null 2&amp;gt;&amp;amp;1" from the command so you can see the error message?</description>
      <pubDate>Thu, 17 Dec 2009 07:27:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-run-ok-manually-but-failed-when-run-as-a-cronjob/m-p/4551564#M370595</guid>
      <dc:creator>River Tarnell</dc:creator>
      <dc:date>2009-12-17T07:27:32Z</dc:date>
    </item>
    <item>
      <title>Re: script run ok manually but failed when run as a cronjob</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-run-ok-manually-but-failed-when-run-as-a-cronjob/m-p/4551565#M370596</link>
      <description>ls -l /root/ftp_nspay_stats.sh&lt;BR /&gt;&lt;BR /&gt;also make sure you have rwx -permissions ?</description>
      <pubDate>Thu, 17 Dec 2009 07:36:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-run-ok-manually-but-failed-when-run-as-a-cronjob/m-p/4551565#M370596</guid>
      <dc:creator>Johnson Punniyalingam</dc:creator>
      <dc:date>2009-12-17T07:36:28Z</dc:date>
    </item>
    <item>
      <title>Re: script run ok manually but failed when run as a cronjob</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-run-ok-manually-but-failed-when-run-as-a-cronjob/m-p/4551566#M370597</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;you could define a dhell before the sh script in the cron.&lt;BR /&gt;&lt;BR /&gt;/usr/bin/ksh /path_to_the_scrit.sh&lt;BR /&gt;&lt;BR /&gt;mikap&lt;BR /&gt;</description>
      <pubDate>Thu, 17 Dec 2009 07:39:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-run-ok-manually-but-failed-when-run-as-a-cronjob/m-p/4551566#M370597</guid>
      <dc:creator>Michal Kapalka (mikap)</dc:creator>
      <dc:date>2009-12-17T07:39:50Z</dc:date>
    </item>
    <item>
      <title>Re: script run ok manually but failed when run as a cronjob</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-run-ok-manually-but-failed-when-run-as-a-cronjob/m-p/4551567#M370598</link>
      <description>Hi All&lt;BR /&gt;&lt;BR /&gt;The error message is &lt;BR /&gt;&lt;BR /&gt;Connected to IP address.&lt;BR /&gt;220 IP address FTP server (Revision 1.1 Version wuftpd-2.6.1(PHNE_36065) Mon Apr 14 06:17:08 GMT 2008) ready.&lt;BR /&gt;Remote system type is UNIX.&lt;BR /&gt;Using binary mode to transfer files.&lt;BR /&gt;331 Password required for email.&lt;BR /&gt;230 User email logged in.&lt;BR /&gt;250 CWD command successful.&lt;BR /&gt;nspay_stats.log: No such file or directory&lt;BR /&gt;221-You have transferred 0 bytes in 0 files.&lt;BR /&gt;221-Total traffic for this session was 341 bytes in 0 transfers.&lt;BR /&gt;221-Thank you for using the FTP service on IP address.&lt;BR /&gt;221 Goodbye.&lt;BR /&gt;&lt;BR /&gt;Any resolution? Please note that when I run manually, it works fine.&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Feng Lin</description>
      <pubDate>Thu, 17 Dec 2009 08:25:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-run-ok-manually-but-failed-when-run-as-a-cronjob/m-p/4551567#M370598</guid>
      <dc:creator>Fenglin</dc:creator>
      <dc:date>2009-12-17T08:25:23Z</dc:date>
    </item>
    <item>
      <title>Re: script run ok manually but failed when run as a cronjob</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-run-ok-manually-but-failed-when-run-as-a-cronjob/m-p/4551568#M370599</link>
      <description>In your original post the filename was "stats.log", but the error references "nspay_stats.log".  I assume the second one is the correct filename?&lt;BR /&gt;&lt;BR /&gt;Most likely the script is not being run from the directory you think it io.  You can confirm that by executing "pwd" at the top of the script.  If that's the problem, just add "cd /some/dir" before the ftp command.  (Where "/some/dir" is the location of nspay_stats.log.)</description>
      <pubDate>Thu, 17 Dec 2009 08:28:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-run-ok-manually-but-failed-when-run-as-a-cronjob/m-p/4551568#M370599</guid>
      <dc:creator>River Tarnell</dc:creator>
      <dc:date>2009-12-17T08:28:41Z</dc:date>
    </item>
    <item>
      <title>Re: script run ok manually but failed when run as a cronjob</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-run-ok-manually-but-failed-when-run-as-a-cronjob/m-p/4551569#M370600</link>
      <description>For cron job run application, you have to mention the full path of the source or destination file or folder.&lt;BR /&gt;&lt;BR /&gt;where is your ftp_stats.txt file or is dataload is correct? or what is the absolute path of stats.log?&lt;BR /&gt;&lt;BR /&gt;put all absolute file path and check.</description>
      <pubDate>Thu, 17 Dec 2009 08:34:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-run-ok-manually-but-failed-when-run-as-a-cronjob/m-p/4551569#M370600</guid>
      <dc:creator>Jeeshan</dc:creator>
      <dc:date>2009-12-17T08:34:26Z</dc:date>
    </item>
    <item>
      <title>Re: script run ok manually but failed when run as a cronjob</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-run-ok-manually-but-failed-when-run-as-a-cronjob/m-p/4551570#M370601</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;define the full path from /.../.../stats.log,&lt;BR /&gt;&lt;BR /&gt;in you script.&lt;BR /&gt;&lt;BR /&gt;mikap</description>
      <pubDate>Thu, 17 Dec 2009 08:35:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-run-ok-manually-but-failed-when-run-as-a-cronjob/m-p/4551570#M370601</guid>
      <dc:creator>Michal Kapalka (mikap)</dc:creator>
      <dc:date>2009-12-17T08:35:55Z</dc:date>
    </item>
    <item>
      <title>Re: script run ok manually but failed when run as a cronjob</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-run-ok-manually-but-failed-when-run-as-a-cronjob/m-p/4551571#M370602</link>
      <description>hi, &lt;BR /&gt;&lt;BR /&gt;full path = absolute path.&lt;BR /&gt;&lt;BR /&gt;mikap</description>
      <pubDate>Thu, 17 Dec 2009 08:36:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-run-ok-manually-but-failed-when-run-as-a-cronjob/m-p/4551571#M370602</guid>
      <dc:creator>Michal Kapalka (mikap)</dc:creator>
      <dc:date>2009-12-17T08:36:21Z</dc:date>
    </item>
    <item>
      <title>Re: script run ok manually but failed when run as a cronjob</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-run-ok-manually-but-failed-when-run-as-a-cronjob/m-p/4551572#M370603</link>
      <description>Hi River tarnell&lt;BR /&gt;&lt;BR /&gt;Thanks for your reply. My problem is solved.&lt;BR /&gt;&lt;BR /&gt;Cheers&lt;BR /&gt;Feng Lin</description>
      <pubDate>Thu, 17 Dec 2009 09:07:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-run-ok-manually-but-failed-when-run-as-a-cronjob/m-p/4551572#M370603</guid>
      <dc:creator>Fenglin</dc:creator>
      <dc:date>2009-12-17T09:07:56Z</dc:date>
    </item>
    <item>
      <title>Re: script run ok manually but failed when run as a cronjob</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-run-ok-manually-but-failed-when-run-as-a-cronjob/m-p/4551573#M370604</link>
      <description>Nice to hear that the problem is solved.&lt;BR /&gt;&lt;BR /&gt;You can now assign points to participants and close the thread. This might help you to get answer in prompt.</description>
      <pubDate>Sun, 20 Dec 2009 09:00:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-run-ok-manually-but-failed-when-run-as-a-cronjob/m-p/4551573#M370604</guid>
      <dc:creator>Jeeshan</dc:creator>
      <dc:date>2009-12-20T09:00:46Z</dc:date>
    </item>
  </channel>
</rss>

