<?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: Cron problems running a Perl script in Operating System - Tru64 Unix</title>
    <link>https://community.hpe.com/t5/operating-system-tru64-unix/cron-problems-running-a-perl-script/m-p/4357736#M18541</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Permissions on the log file maybe ?&lt;BR /&gt;&lt;BR /&gt;Or maybe perl isn't in /usr/local/bin, although I'd expect that to cause it to fail interactively...&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;&lt;BR /&gt;Rob</description>
    <pubDate>Fri, 13 Feb 2009 08:48:15 GMT</pubDate>
    <dc:creator>Rob Leadbeater</dc:creator>
    <dc:date>2009-02-13T08:48:15Z</dc:date>
    <item>
      <title>Cron problems running a Perl script</title>
      <link>https://community.hpe.com/t5/operating-system-tru64-unix/cron-problems-running-a-perl-script/m-p/4357732#M18537</link>
      <description>All,&lt;BR /&gt;&lt;BR /&gt;I have a strange problem on a new Tru64 host I am configuring. I am attempting to run a simple Perl script from cron:&lt;BR /&gt;* * * * * /tmp/test.pl &amp;gt;&amp;gt; /tmp/test.log 2&amp;gt;&amp;amp;1&lt;BR /&gt;&lt;BR /&gt;The output file contains no records, and cron log shows:&lt;BR /&gt;&amp;lt; testuser      296824 cr /tmp/test.pl &amp;gt;&amp;gt; /tmp/test.log 2&amp;gt;&amp;amp;1 rc=1  Fri Feb 13 07:02:00 2009&lt;BR /&gt;&lt;BR /&gt;The contents of the Perl script is as follows, has correct permissions and runs OK interactively:&lt;BR /&gt;#!/usr/local/bin/perl -w &lt;BR /&gt;print "This is a test ";&lt;BR /&gt;exec ('date');&lt;BR /&gt;&lt;BR /&gt;Obviously, rc=1 an error is occurring preventing my script from running.&lt;BR /&gt;&lt;BR /&gt;I have tested the script and cron entries against another Tru64 host and a HP-UX host - both return expected results in the /tmp/test.log file.&lt;BR /&gt;&lt;BR /&gt;I can force cron to run the script by changing the cron entry to:&lt;BR /&gt;/bin/ksh -c ". /etc/profile;/tmp/test.pl" &amp;gt;&amp;gt; /tmp/test.log 2&amp;gt;&amp;amp;1&lt;BR /&gt;&lt;BR /&gt;My frustration is that I don't have to change the cron entry on my other test boxes to get the environment set up correctly. There's a difference in the OS environment setup on the new Tru64 host I am intalling ... where do I start looking?!?&lt;BR /&gt;&lt;BR /&gt;Points gratefully awarded for any help!</description>
      <pubDate>Thu, 12 Feb 2009 21:11:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-tru64-unix/cron-problems-running-a-perl-script/m-p/4357732#M18537</guid>
      <dc:creator>IE Admins</dc:creator>
      <dc:date>2009-02-12T21:11:34Z</dc:date>
    </item>
    <item>
      <title>Re: Cron problems running a Perl script</title>
      <link>https://community.hpe.com/t5/operating-system-tru64-unix/cron-problems-running-a-perl-script/m-p/4357733#M18538</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I haven't tested your script, but I'll guess that this is an environment thing...&lt;BR /&gt;&lt;BR /&gt;Try changing date to /usr/bin/date (or wherever date lives...)&lt;BR /&gt;&lt;BR /&gt;Hope this helps,&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Rob</description>
      <pubDate>Thu, 12 Feb 2009 22:09:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-tru64-unix/cron-problems-running-a-perl-script/m-p/4357733#M18538</guid>
      <dc:creator>Rob Leadbeater</dc:creator>
      <dc:date>2009-02-12T22:09:08Z</dc:date>
    </item>
    <item>
      <title>Re: Cron problems running a Perl script</title>
      <link>https://community.hpe.com/t5/operating-system-tru64-unix/cron-problems-running-a-perl-script/m-p/4357734#M18539</link>
      <description>Thanks for the suggestion - I have updated the script with no luck.&lt;BR /&gt;&lt;BR /&gt;The script doesn't seem to invoke at all - the print command does not return any output</description>
      <pubDate>Thu, 12 Feb 2009 22:42:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-tru64-unix/cron-problems-running-a-perl-script/m-p/4357734#M18539</guid>
      <dc:creator>IE Admins</dc:creator>
      <dc:date>2009-02-12T22:42:33Z</dc:date>
    </item>
    <item>
      <title>Re: Cron problems running a Perl script</title>
      <link>https://community.hpe.com/t5/operating-system-tru64-unix/cron-problems-running-a-perl-script/m-p/4357735#M18540</link>
      <description>&amp;gt;I can force cron to run the script by changing the cron entry to:&lt;BR /&gt;/bin/ksh -c ". /etc/profile;/tmp/test.pl"&lt;BR /&gt;&lt;BR /&gt;This is one solution if you need your profile.&lt;BR /&gt;You could also create a ksh script that looks what variables are set and see which one perl needs, by trial and error.</description>
      <pubDate>Fri, 13 Feb 2009 04:52:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-tru64-unix/cron-problems-running-a-perl-script/m-p/4357735#M18540</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-02-13T04:52:24Z</dc:date>
    </item>
    <item>
      <title>Re: Cron problems running a Perl script</title>
      <link>https://community.hpe.com/t5/operating-system-tru64-unix/cron-problems-running-a-perl-script/m-p/4357736#M18541</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Permissions on the log file maybe ?&lt;BR /&gt;&lt;BR /&gt;Or maybe perl isn't in /usr/local/bin, although I'd expect that to cause it to fail interactively...&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;&lt;BR /&gt;Rob</description>
      <pubDate>Fri, 13 Feb 2009 08:48:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-tru64-unix/cron-problems-running-a-perl-script/m-p/4357736#M18541</guid>
      <dc:creator>Rob Leadbeater</dc:creator>
      <dc:date>2009-02-13T08:48:15Z</dc:date>
    </item>
  </channel>
</rss>

