<?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: crontab for specific user in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/crontab-for-specific-user/m-p/5064472#M437433</link>
    <description>Shalom Den,&lt;BR /&gt;&lt;BR /&gt;I suggest building the profile read into the script.&lt;BR /&gt;&lt;BR /&gt;That seems much easier than what you are doing in AIX.&lt;BR /&gt;&lt;BR /&gt;/usr/bin/su -c username &lt;COMMAND&gt; &lt;BR /&gt;&lt;BR /&gt;That format will work in cron.&lt;BR /&gt;&lt;BR /&gt;SEP&lt;/COMMAND&gt;</description>
    <pubDate>Wed, 22 Aug 2007 08:11:21 GMT</pubDate>
    <dc:creator>Steven E. Protter</dc:creator>
    <dc:date>2007-08-22T08:11:21Z</dc:date>
    <item>
      <title>crontab for specific user</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/crontab-for-specific-user/m-p/5064471#M437432</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;I need to prepare a crontab on the oracle user. How to write the crontab line and to be sure that user profile will be read before calling the script ?&lt;BR /&gt;&lt;BR /&gt;With AIX i can write something like that:&lt;BR /&gt;50 12 * * *  /usr/bin/ksh -c "( . /etc/profile; . /gespxpm/ms/users/gespxpm/.profile &amp;gt;/dev/null; . /gespxpm/ms/exp/jcl/ADM_ORA_MajTableSuiviActivite.ksh dba_tools dba  &amp;gt;/dev/null 2&amp;gt;&amp;amp;1)"&lt;BR /&gt;&lt;BR /&gt;How to with Hp-UX ?&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Den</description>
      <pubDate>Wed, 22 Aug 2007 08:05:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/crontab-for-specific-user/m-p/5064471#M437432</guid>
      <dc:creator>Leo The Cat</dc:creator>
      <dc:date>2007-08-22T08:05:50Z</dc:date>
    </item>
    <item>
      <title>Re: crontab for specific user</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/crontab-for-specific-user/m-p/5064472#M437433</link>
      <description>Shalom Den,&lt;BR /&gt;&lt;BR /&gt;I suggest building the profile read into the script.&lt;BR /&gt;&lt;BR /&gt;That seems much easier than what you are doing in AIX.&lt;BR /&gt;&lt;BR /&gt;/usr/bin/su -c username &lt;COMMAND&gt; &lt;BR /&gt;&lt;BR /&gt;That format will work in cron.&lt;BR /&gt;&lt;BR /&gt;SEP&lt;/COMMAND&gt;</description>
      <pubDate>Wed, 22 Aug 2007 08:11:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/crontab-for-specific-user/m-p/5064472#M437433</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2007-08-22T08:11:21Z</dc:date>
    </item>
    <item>
      <title>Re: crontab for specific user</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/crontab-for-specific-user/m-p/5064473#M437434</link>
      <description>Hi Den:&lt;BR /&gt;&lt;BR /&gt;This would work with HP-UX but you would want to source the user's ".profile" since that is a user's local view whereas '/etc/profile' is the global view.&lt;BR /&gt;&lt;BR /&gt;Having said that, however, there are better ways than sourcing a profile.  A profile is designed for interactive use during login.  As such, HP-UX '.profile's contain terminal-interactive 'stty' and 'tset' commands that expect the process to be attached to a terminal.  A crontask has no controlling terminal and thus sourcing a '.profile' will yield "not a typewriter" messages when 'stty' and/or 'tset' commands execute.  &lt;BR /&gt;&lt;BR /&gt;Certainly, you can redirect STDERR to '/dev/null' to eliminate these messages, but that may hide *useful* messages too.  One better approach is to only conditionaly execute the 'stty' and 'tset' commands if your environment is associated with a terminal:&lt;BR /&gt;&lt;BR /&gt;if [ -t 0 ]; then&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;A second approach is to put your environmental variables in a file that is separate from your profile.  Then, source that file in your profile for logins as well as in crontasks and scripts as needed.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 22 Aug 2007 08:41:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/crontab-for-specific-user/m-p/5064473#M437434</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-08-22T08:41:04Z</dc:date>
    </item>
    <item>
      <title>Re: crontab for specific user</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/crontab-for-specific-user/m-p/5064474#M437435</link>
      <description>Huh&lt;BR /&gt;&lt;BR /&gt;the oracle user crontab below doesn't works. &lt;BR /&gt;&lt;BR /&gt;00,10,20,30,40,50 * * * * /usr/bin/su - oracle /logiciel/app/oracle/oas10g/measures/GenerateOASMeasures.ksh&lt;BR /&gt;&lt;BR /&gt;I finally prefer:&lt;BR /&gt;&lt;BR /&gt;00,10,20,30,40,50 * * * * /usr/bin/ksh -c "( . /etc/profile; . /logiciel/app/oracle/.profile &amp;gt; /dev/null; . /logiciel/app/oracle/oas10g/m&lt;BR /&gt;easures/GenerateOASMeasures.ksh &amp;gt;/dev/null 2&amp;gt;&amp;amp;1)"&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Den&lt;BR /&gt;</description>
      <pubDate>Wed, 22 Aug 2007 09:27:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/crontab-for-specific-user/m-p/5064474#M437435</guid>
      <dc:creator>Leo The Cat</dc:creator>
      <dc:date>2007-08-22T09:27:13Z</dc:date>
    </item>
    <item>
      <title>Re: crontab for specific user</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/crontab-for-specific-user/m-p/5064475#M437436</link>
      <description>Hi Den:&lt;BR /&gt;&lt;BR /&gt;# su - oracle -c "script"&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 22 Aug 2007 09:40:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/crontab-for-specific-user/m-p/5064475#M437436</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-08-22T09:40:29Z</dc:date>
    </item>
    <item>
      <title>Re: crontab for specific user</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/crontab-for-specific-user/m-p/5064476#M437437</link>
      <description>Edit and submit a cronfile:&lt;BR /&gt;# crontab -e&lt;BR /&gt;&lt;BR /&gt;If cron won't work, try to find error in /var/adm/cron/log. If log has no info, suggest:&lt;BR /&gt;(1) check user's incoming mail (system will sent messages if cron failed.&lt;BR /&gt;(2) add additioanl entry at cron command to get more hint/error at /tmp/err.txt if cron not working; for example&lt;BR /&gt;&lt;BR /&gt;* * * * * /myscript &amp;gt;&amp;gt; /tmp/err.txt 2&amp;gt;&amp;amp;1</description>
      <pubDate>Thu, 23 Aug 2007 04:18:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/crontab-for-specific-user/m-p/5064476#M437437</guid>
      <dc:creator>tsf_1</dc:creator>
      <dc:date>2007-08-23T04:18:15Z</dc:date>
    </item>
    <item>
      <title>Re: crontab for specific user</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/crontab-for-specific-user/m-p/5064477#M437438</link>
      <description>Thanks it's ok -c and other informations were welcomed. &lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Den</description>
      <pubDate>Thu, 23 Aug 2007 11:10:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/crontab-for-specific-user/m-p/5064477#M437438</guid>
      <dc:creator>Leo The Cat</dc:creator>
      <dc:date>2007-08-23T11:10:09Z</dc:date>
    </item>
  </channel>
</rss>

