<?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: Find out cron stated in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/find-out-cron-stated/m-p/3510237#M844075</link>
    <description>hi,&lt;BR /&gt;&lt;BR /&gt;/var/adm/cron/log will tell u whom and when a cronjob was fired.&lt;BR /&gt;&lt;BR /&gt;regards.</description>
    <pubDate>Wed, 23 Mar 2005 05:58:44 GMT</pubDate>
    <dc:creator>Joseph Loo</dc:creator>
    <dc:date>2005-03-23T05:58:44Z</dc:date>
    <item>
      <title>Find out cron stated</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-out-cron-stated/m-p/3510236#M844074</link>
      <description>Hello&lt;BR /&gt;I must find out whether a shell-script is started by a cron job or by manually by root or an other user.&lt;BR /&gt;&lt;BR /&gt;Thanks &lt;BR /&gt;Ralf</description>
      <pubDate>Wed, 23 Mar 2005 05:55:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-out-cron-stated/m-p/3510236#M844074</guid>
      <dc:creator>Ralf Buchhold</dc:creator>
      <dc:date>2005-03-23T05:55:06Z</dc:date>
    </item>
    <item>
      <title>Re: Find out cron stated</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-out-cron-stated/m-p/3510237#M844075</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;/var/adm/cron/log will tell u whom and when a cronjob was fired.&lt;BR /&gt;&lt;BR /&gt;regards.</description>
      <pubDate>Wed, 23 Mar 2005 05:58:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-out-cron-stated/m-p/3510237#M844075</guid>
      <dc:creator>Joseph Loo</dc:creator>
      <dc:date>2005-03-23T05:58:44Z</dc:date>
    </item>
    <item>
      <title>Re: Find out cron stated</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-out-cron-stated/m-p/3510238#M844076</link>
      <description>Sorry &lt;BR /&gt;I mean to find it out in the script file to do different actions.&lt;BR /&gt;Ralf</description>
      <pubDate>Wed, 23 Mar 2005 06:02:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-out-cron-stated/m-p/3510238#M844076</guid>
      <dc:creator>Ralf Buchhold</dc:creator>
      <dc:date>2005-03-23T06:02:14Z</dc:date>
    </item>
    <item>
      <title>Re: Find out cron stated</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-out-cron-stated/m-p/3510239#M844077</link>
      <description>Look for #crontab -l (if the job is defined).&lt;BR /&gt;&lt;BR /&gt;Also check cron log /var/adm/cron/log&lt;BR /&gt;&lt;BR /&gt;sks</description>
      <pubDate>Wed, 23 Mar 2005 06:02:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-out-cron-stated/m-p/3510239#M844077</guid>
      <dc:creator>Sanjay Kumar Suri</dc:creator>
      <dc:date>2005-03-23T06:02:36Z</dc:date>
    </item>
    <item>
      <title>Re: Find out cron stated</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-out-cron-stated/m-p/3510240#M844078</link>
      <description>Ralf,&lt;BR /&gt;goto the directory where all the crontabs are held and search for your shellscript:&lt;BR /&gt;cd /var/spool/cron/crontabs&lt;BR /&gt;grep shell-scriptname *&lt;BR /&gt;&lt;BR /&gt;Is the script being executed on a regular basis? If yes then its most likely cron or 'at'.&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 23 Mar 2005 06:20:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-out-cron-stated/m-p/3510240#M844078</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2005-03-23T06:20:45Z</dc:date>
    </item>
    <item>
      <title>Re: Find out cron stated</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-out-cron-stated/m-p/3510241#M844079</link>
      <description>Hi,&lt;BR /&gt;perhaps you can make use of the stty command: if you execute "stty -a" in the script and it does not return 0, it must be because no (controlling) terminal is attached -  hence I would argue that the script must have been executed from cron.&lt;BR /&gt;Just an idea -  perhaps other members have  obvious arguments against this.&lt;BR /&gt; &lt;BR /&gt;regards,&lt;BR /&gt;John K.</description>
      <pubDate>Wed, 23 Mar 2005 07:44:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-out-cron-stated/m-p/3510241#M844079</guid>
      <dc:creator>john korterman</dc:creator>
      <dc:date>2005-03-23T07:44:12Z</dc:date>
    </item>
    <item>
      <title>Re: Find out cron stated</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-out-cron-stated/m-p/3510242#M844080</link>
      <description>Ralf,&lt;BR /&gt;&lt;BR /&gt;Whenever I write a script that can be run either interactively or from cron, I check the  $TERM variable.  If it has a value, then the script is being run interactively.  If not, it's being run from cron or at.  Based on that test, I either echo stuff to the terminal, or echo stuff to a log file.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Mark</description>
      <pubDate>Thu, 24 Mar 2005 09:58:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-out-cron-stated/m-p/3510242#M844080</guid>
      <dc:creator>Mark Ellzey</dc:creator>
      <dc:date>2005-03-24T09:58:44Z</dc:date>
    </item>
    <item>
      <title>Re: Find out cron stated</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-out-cron-stated/m-p/3510243#M844081</link>
      <description>The "standard" way of doing this is to determine if stdin (file descriptor 0) is a tty (terminal) device.&lt;BR /&gt;&lt;BR /&gt;if [ -t 0 ]&lt;BR /&gt;  then&lt;BR /&gt;    echo "I'm connected to a terminal. I must be interactive"&lt;BR /&gt;  else&lt;BR /&gt;    echo "No terminal"&lt;BR /&gt;  fi&lt;BR /&gt;&lt;BR /&gt;Man test for details.&lt;BR /&gt;</description>
      <pubDate>Thu, 24 Mar 2005 10:31:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-out-cron-stated/m-p/3510243#M844081</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2005-03-24T10:31:07Z</dc:date>
    </item>
  </channel>
</rss>

