<?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: query on crontab in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/query-on-crontab/m-p/5200892#M463418</link>
    <description>Hi ,&lt;BR /&gt;&lt;BR /&gt;Can you try putting the crontab entry under root like below &lt;BR /&gt;&lt;BR /&gt;Login:- root&lt;BR /&gt;&lt;BR /&gt;# crontab -e&lt;BR /&gt;&lt;BR /&gt;0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57 * * * * /pkg_test/pkg_check.sh&lt;BR /&gt;&lt;BR /&gt;:wq!&lt;BR /&gt;&lt;BR /&gt;I suspect you are ready under root, no need to su - root -c .. while crontab.?&lt;BR /&gt;&lt;BR /&gt;also best place to check tunder cron.logs&lt;BR /&gt;&lt;BR /&gt;cat /var/adm/cron/cron.log ?&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;&lt;BR /&gt;Rgds,&lt;BR /&gt;Johnson&lt;BR /&gt;</description>
    <pubDate>Mon, 28 Sep 2009 05:15:11 GMT</pubDate>
    <dc:creator>Johnson Punniyalingam</dc:creator>
    <dc:date>2009-09-28T05:15:11Z</dc:date>
    <item>
      <title>query on crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/query-on-crontab/m-p/5200890#M463416</link>
      <description>Dear All,&lt;BR /&gt;&lt;BR /&gt;I have written a script(pkg_check.sh) to monitor MC/ServiceGuard cluster status(down,halting,down..) which is attached with this thread. The Problem &lt;BR /&gt;is that when i run this script using "sh pkg_check.sh" command it works fine&lt;BR /&gt;but when i want to run this script using cron job only "cmviewcl -v &lt;BR /&gt;&lt;BR /&gt;&amp;gt;/pkg_test/cluster_status.txt" command only work.Other part of this script&lt;BR /&gt;is not working. I have given following entry in the cron schedule:&lt;BR /&gt;&lt;BR /&gt;0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57 * * * *  su - root -c "/pkg_test/pkg_check.sh" 1&amp;gt;/dev/null 2&amp;gt;/dev/null&lt;BR /&gt;&lt;BR /&gt;I have checked "/var/adm/cron/cron.allow".Here "root" user exist.I have already set &lt;BR /&gt;permission 777 of pkg_check.sh script. But no works.&lt;BR /&gt;&lt;BR /&gt;Can any one help me that where is my problem??&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Minhaz</description>
      <pubDate>Mon, 28 Sep 2009 01:56:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/query-on-crontab/m-p/5200890#M463416</guid>
      <dc:creator>Md. Minhaz Khan</dc:creator>
      <dc:date>2009-09-28T01:56:10Z</dc:date>
    </item>
    <item>
      <title>Re: query on crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/query-on-crontab/m-p/5200891#M463417</link>
      <description>" cmviewcl -v" output is attach.</description>
      <pubDate>Mon, 28 Sep 2009 01:57:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/query-on-crontab/m-p/5200891#M463417</guid>
      <dc:creator>Md. Minhaz Khan</dc:creator>
      <dc:date>2009-09-28T01:57:41Z</dc:date>
    </item>
    <item>
      <title>Re: query on crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/query-on-crontab/m-p/5200892#M463418</link>
      <description>Hi ,&lt;BR /&gt;&lt;BR /&gt;Can you try putting the crontab entry under root like below &lt;BR /&gt;&lt;BR /&gt;Login:- root&lt;BR /&gt;&lt;BR /&gt;# crontab -e&lt;BR /&gt;&lt;BR /&gt;0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57 * * * * /pkg_test/pkg_check.sh&lt;BR /&gt;&lt;BR /&gt;:wq!&lt;BR /&gt;&lt;BR /&gt;I suspect you are ready under root, no need to su - root -c .. while crontab.?&lt;BR /&gt;&lt;BR /&gt;also best place to check tunder cron.logs&lt;BR /&gt;&lt;BR /&gt;cat /var/adm/cron/cron.log ?&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;&lt;BR /&gt;Rgds,&lt;BR /&gt;Johnson&lt;BR /&gt;</description>
      <pubDate>Mon, 28 Sep 2009 05:15:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/query-on-crontab/m-p/5200892#M463418</guid>
      <dc:creator>Johnson Punniyalingam</dc:creator>
      <dc:date>2009-09-28T05:15:11Z</dc:date>
    </item>
    <item>
      <title>Re: query on crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/query-on-crontab/m-p/5200893#M463419</link>
      <description>two things must be considered first when running a code via cronjob :&lt;BR /&gt;&lt;BR /&gt;Everything must use full path&lt;BR /&gt;and user privilege.&lt;BR /&gt;&lt;BR /&gt;-I recommend use full path instead of relative path; for example use /usr/bin/date not date ..&lt;BR /&gt;&lt;BR /&gt;-your script must have execute privilege.&lt;BR /&gt;&lt;BR /&gt;and besides ,since I am not sure your syntax is correct; if you use user root you can enter like this ;&lt;BR /&gt;&lt;BR /&gt;0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57 * * * * /pkg_test/pkg_check.sh &amp;gt; /dev/null 2&amp;gt;&amp;amp;1&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 28 Sep 2009 05:19:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/query-on-crontab/m-p/5200893#M463419</guid>
      <dc:creator>Hakki Aydin Ucar</dc:creator>
      <dc:date>2009-09-28T05:19:25Z</dc:date>
    </item>
    <item>
      <title>Re: query on crontab</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/query-on-crontab/m-p/5200894#M463420</link>
      <description>Thanks everybody. Problem was solved&lt;BR /&gt;&lt;BR /&gt;Minhaz</description>
      <pubDate>Tue, 29 Sep 2009 03:45:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/query-on-crontab/m-p/5200894#M463420</guid>
      <dc:creator>Md. Minhaz Khan</dc:creator>
      <dc:date>2009-09-29T03:45:24Z</dc:date>
    </item>
  </channel>
</rss>

