<?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 help... in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-help/m-p/3165373#M160225</link>
    <description>is your PATH defined in your shell script? If not, then you ought to define as cron doesn't import your environment profiles.</description>
    <pubDate>Thu, 15 Jan 2004 11:17:58 GMT</pubDate>
    <dc:creator>Marco Santerre</dc:creator>
    <dc:date>2004-01-15T11:17:58Z</dc:date>
    <item>
      <title>Cron help...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-help/m-p/3165370#M160222</link>
      <description>Ok, I am somewhat perplexed about what I'm doing wrong. Here is a script:&lt;BR /&gt;-rwxr-xr-x   1 speclive   live           694 Jan 15 10:01 apostdat&lt;BR /&gt;&lt;BR /&gt;All it basically does is update a number in this file:&lt;BR /&gt;&lt;BR /&gt;-rw-rw-r--   1 speclive   live            15 Jan 15 00:32 DPOSTDAT&lt;BR /&gt;&lt;BR /&gt;When I run apostdat script, as root FROM THE COMMAND LINE it works fine and updates DPOSTDAT.&lt;BR /&gt;When I add the following entry in cron (through "crontab -e"):&lt;BR /&gt;&lt;BR /&gt;03 10 * * * /var/summit/spectrum/FI1/FI/DATA/apostdat&lt;BR /&gt;&lt;BR /&gt;It doesn't update the file. What is going on here?! /var/adm/cron/cron.allow file includes root.&lt;BR /&gt;Does it have to do with the permissions of either the script or the file the script is updating? But I am able to run it successfully as root, so why not through cron as well?&lt;BR /&gt;Thanks and the right answer will be fully rewarded:)&lt;BR /&gt;&lt;BR /&gt;-Hazem</description>
      <pubDate>Thu, 15 Jan 2004 11:10:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-help/m-p/3165370#M160222</guid>
      <dc:creator>Hazem Mahmoud_3</dc:creator>
      <dc:date>2004-01-15T11:10:58Z</dc:date>
    </item>
    <item>
      <title>Re: Cron help...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-help/m-p/3165371#M160223</link>
      <description>Hazem,&lt;BR /&gt;&lt;BR /&gt;the pb might be you must initialize your PATH (and other variables) within your script.&lt;BR /&gt;(cron does not run the profile)&lt;BR /&gt;&lt;BR /&gt;The other way around is to have a wrapper script that will initialize all required variables before yu run the specific script.&lt;BR /&gt;&lt;BR /&gt;Rgds,&lt;BR /&gt;Jean-Luc</description>
      <pubDate>Thu, 15 Jan 2004 11:13:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-help/m-p/3165371#M160223</guid>
      <dc:creator>Jean-Luc Oudart</dc:creator>
      <dc:date>2004-01-15T11:13:13Z</dc:date>
    </item>
    <item>
      <title>Re: Cron help...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-help/m-p/3165372#M160224</link>
      <description>Keep in mind that commands run from cron do NOT import the environment settings from /etc/profile and ~/.profile (they are not sourced).  Most likely this is theissue.  Use a PATH= statement in the script to set the path and any other vars that need to be set.  Or have the script soure /etc/profile, etc.&lt;BR /&gt;&lt;BR /&gt;cron should mail back a message to the user with any errors (i.e. command not found) encountered.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 15 Jan 2004 11:13:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-help/m-p/3165372#M160224</guid>
      <dc:creator>Tom Danzig</dc:creator>
      <dc:date>2004-01-15T11:13:56Z</dc:date>
    </item>
    <item>
      <title>Re: Cron help...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-help/m-p/3165373#M160225</link>
      <description>is your PATH defined in your shell script? If not, then you ought to define as cron doesn't import your environment profiles.</description>
      <pubDate>Thu, 15 Jan 2004 11:17:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-help/m-p/3165373#M160225</guid>
      <dc:creator>Marco Santerre</dc:creator>
      <dc:date>2004-01-15T11:17:58Z</dc:date>
    </item>
    <item>
      <title>Re: Cron help...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-help/m-p/3165374#M160226</link>
      <description>Hazem,&lt;BR /&gt;&lt;BR /&gt;In a word:  alway use full path names in scripts.  You can also set paths within the script but it's just as easy to use the full path name.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Thu, 15 Jan 2004 11:20:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-help/m-p/3165374#M160226</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2004-01-15T11:20:26Z</dc:date>
    </item>
    <item>
      <title>Re: Cron help...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-help/m-p/3165375#M160227</link>
      <description>You guys are awesome! Thanks! I did not include the full path name of a script running inside there that actually does the editing of the file (qedit). Once I added the full path, it worked great!!! I figure it's better to add the full path as opposed to setting the PATH variable for security reasons. But that just completely slipped my mind. Thanks again you guys!&lt;BR /&gt;This forum is great!&lt;BR /&gt;&lt;BR /&gt;-Hazem</description>
      <pubDate>Thu, 15 Jan 2004 11:24:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-help/m-p/3165375#M160227</guid>
      <dc:creator>Hazem Mahmoud_3</dc:creator>
      <dc:date>2004-01-15T11:24:38Z</dc:date>
    </item>
  </channel>
</rss>

