<?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 issue... in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/crontab-issue/m-p/4085375#M309701</link>
    <description>For ignite from cron - we found it was better to call a script with your ignite commands inside it.:&lt;BR /&gt;&lt;BR /&gt;0 2 * * 6 /opt/ignite/bin/make_net_recovery_script.sh&lt;BR /&gt;&lt;BR /&gt;#cat /opt/ignite/bin/make_net_recovery_script.sh&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;/opt/ignite/bin/make_net_recovery -v -x exclude=/var/opt/perf/datafiles -x inc_entire=vg00 -s ignite &amp;gt;/usr/local/logs/net_ignite_log.`date +%y%m%d` 2&amp;gt;&amp;amp;1&lt;BR /&gt;/opt/ignite/bin/report_net_ignite_status_creation_image.sh&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Rgds...Geoff</description>
    <pubDate>Fri, 12 Oct 2007 10:24:35 GMT</pubDate>
    <dc:creator>Geoff Wild</dc:creator>
    <dc:date>2007-10-12T10:24:35Z</dc:date>
    <item>
      <title>crontab issue...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/crontab-issue/m-p/4085369#M309695</link>
      <description>I have both 11.11 and 11.23 servers having cron job issues.&lt;BR /&gt;&lt;BR /&gt;I restarted cron daemon with '/sbin/init.d/cron stop/start'.&lt;BR /&gt;&lt;BR /&gt;And it still doesn't work properly. I was thinking about rebooting servers but I have no downtime.&lt;BR /&gt;&lt;BR /&gt;Please give me a advise. Thank you.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 12 Oct 2007 10:01:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/crontab-issue/m-p/4085369#M309695</guid>
      <dc:creator>deCG</dc:creator>
      <dc:date>2007-10-12T10:01:17Z</dc:date>
    </item>
    <item>
      <title>Re: crontab issue...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/crontab-issue/m-p/4085370#M309696</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;Define exactly what you mean by "issues".  Exactly what isn't working?  What are your symptoms? &lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Fri, 12 Oct 2007 10:03:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/crontab-issue/m-p/4085370#M309696</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-10-12T10:03:36Z</dc:date>
    </item>
    <item>
      <title>Re: crontab issue...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/crontab-issue/m-p/4085371#M309697</link>
      <description>Well I put ignite script to backup OS which is used for all our HPUX servers.&lt;BR /&gt;But some of servers' cron job is not working. So I restarted cron daemon a couple of times and it still won't work.&lt;BR /&gt;(Actually some servers did work, but some&lt;BR /&gt;there are 5 servers not working.)&lt;BR /&gt;&lt;BR /&gt;I hope this describes in more details.&lt;BR /&gt;&lt;BR /&gt;Thanks.</description>
      <pubDate>Fri, 12 Oct 2007 10:07:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/crontab-issue/m-p/4085371#M309697</guid>
      <dc:creator>deCG</dc:creator>
      <dc:date>2007-10-12T10:07:27Z</dc:date>
    </item>
    <item>
      <title>Re: crontab issue...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/crontab-issue/m-p/4085372#M309698</link>
      <description>Well, I would start with something like examining /var/adm/cron/log and looking for clues. It would help if you translate "doesn't work properly" into something a bit more specific.</description>
      <pubDate>Fri, 12 Oct 2007 10:07:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/crontab-issue/m-p/4085372#M309698</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2007-10-12T10:07:59Z</dc:date>
    </item>
    <item>
      <title>Re: crontab issue...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/crontab-issue/m-p/4085373#M309699</link>
      <description>"issues"?&lt;BR /&gt;&lt;BR /&gt;what, they fail?  run at wrong time? don't seem to get run?  &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 12 Oct 2007 10:08:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/crontab-issue/m-p/4085373#M309699</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2007-10-12T10:08:08Z</dc:date>
    </item>
    <item>
      <title>Re: crontab issue...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/crontab-issue/m-p/4085374#M309700</link>
      <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;&amp;gt; Well I put ignite script to backup OS which is used for all our HPUX servers.&lt;BR /&gt; &lt;BR /&gt;So, is it that your script executes correctly if run from a shell commandline but not when 'cron'ed?&lt;BR /&gt;&lt;BR /&gt;Remember, the 'cron' environment is devoid of environmental variables declared in your '.profile' since it is not a login that reads your profile.  Your default environment consists only of HOME, SHELL, LOGNAME and PATH and the PATH *only* contains '/usr/bin:/usr/sbin:.'.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Fri, 12 Oct 2007 10:12:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/crontab-issue/m-p/4085374#M309700</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-10-12T10:12:53Z</dc:date>
    </item>
    <item>
      <title>Re: crontab issue...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/crontab-issue/m-p/4085375#M309701</link>
      <description>For ignite from cron - we found it was better to call a script with your ignite commands inside it.:&lt;BR /&gt;&lt;BR /&gt;0 2 * * 6 /opt/ignite/bin/make_net_recovery_script.sh&lt;BR /&gt;&lt;BR /&gt;#cat /opt/ignite/bin/make_net_recovery_script.sh&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;/opt/ignite/bin/make_net_recovery -v -x exclude=/var/opt/perf/datafiles -x inc_entire=vg00 -s ignite &amp;gt;/usr/local/logs/net_ignite_log.`date +%y%m%d` 2&amp;gt;&amp;amp;1&lt;BR /&gt;/opt/ignite/bin/report_net_ignite_status_creation_image.sh&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Rgds...Geoff</description>
      <pubDate>Fri, 12 Oct 2007 10:24:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/crontab-issue/m-p/4085375#M309701</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2007-10-12T10:24:35Z</dc:date>
    </item>
    <item>
      <title>Re: crontab issue...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/crontab-issue/m-p/4085376#M309702</link>
      <description>&amp;lt;  root 11125 c Sun Oct  7 14:59:09 EDT 2007&lt;BR /&gt;&amp;gt;  CMD: /Admin/Backup/OS_Backup.sh 1&amp;gt;/dev/null 2&amp;gt;/dev/null&lt;BR /&gt;&lt;BR /&gt;This is from the log.&lt;BR /&gt;&lt;BR /&gt;$ /Admin/Backup#more OS_Backup.sh&lt;BR /&gt;Back_Home=/Admin/Backup&lt;BR /&gt;Back_Log=$Back_Home/Back.log&lt;BR /&gt;echo "`date`: OS Backup Started" &amp;gt; $Back_Log&lt;BR /&gt;/opt/ignite/bin/make_tape_recovery -AvI -a /dev/rmt/0mn 2&amp;gt; $Back_Home/ignite.log&lt;BR /&gt;echo "status:" $? &amp;gt;&amp;gt; $Back_Log&lt;BR /&gt;echo "`date`: OS Backup Finished" &amp;gt;&amp;gt; $Back_Log&lt;BR /&gt;&lt;BR /&gt;And this is script which is used on all servers.&lt;BR /&gt;&lt;BR /&gt;But Back_Log never gets updated and no data on ignite.log.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 12 Oct 2007 11:09:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/crontab-issue/m-p/4085376#M309702</guid>
      <dc:creator>deCG</dc:creator>
      <dc:date>2007-10-12T11:09:37Z</dc:date>
    </item>
    <item>
      <title>Re: crontab issue...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/crontab-issue/m-p/4085377#M309703</link>
      <description>Your crontab entry:&lt;BR /&gt; &lt;BR /&gt;&amp;gt; ... /Admin/Backup/OS_Backup.sh 1&amp;gt;/dev/null 2&amp;gt;/dev/null&lt;BR /&gt; &lt;BR /&gt;You script is probably trying to tell what is broken but you have thrown everything away into /dev/null. Change the /dev/null redirection to a local logfile like this:&lt;BR /&gt; &lt;BR /&gt;/Admin/Backup/OS_Backup.sh &amp;gt; /tmp/OS_backup.log 2&amp;gt;&amp;amp;1&lt;BR /&gt; &lt;BR /&gt;then run the script using the batch command. This will simulate the crontab environment but it will run immediately. Are you running your make_tape_recovery with -v? This will tell you a lot in the recovery.log file.</description>
      <pubDate>Fri, 12 Oct 2007 12:30:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/crontab-issue/m-p/4085377#M309703</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2007-10-12T12:30:02Z</dc:date>
    </item>
    <item>
      <title>Re: crontab issue...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/crontab-issue/m-p/4085378#M309704</link>
      <description>OK, I should try that.&lt;BR /&gt;But weird thing is that when I run script manually there is no error.&lt;BR /&gt;&lt;BR /&gt;Anyway, I will try that for next OS backup.&lt;BR /&gt;&lt;BR /&gt;Thank you.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 12 Oct 2007 12:45:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/crontab-issue/m-p/4085378#M309704</guid>
      <dc:creator>deCG</dc:creator>
      <dc:date>2007-10-12T12:45:29Z</dc:date>
    </item>
    <item>
      <title>Re: crontab issue...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/crontab-issue/m-p/4085379#M309705</link>
      <description>&amp;gt; But weird thing is that when I run script manually there is no error.&lt;BR /&gt; &lt;BR /&gt;Absolutely expected for a script that was not written for the cron/at/batch environments. cron never logs in. When you run the script by hand, you are doing it from a login shell with variables set by several profile scripts. &lt;BR /&gt; &lt;BR /&gt;&amp;gt; Anyway, I will try that for next OS backup.&lt;BR /&gt; &lt;BR /&gt;I would run it now using the batch command rather than cron and if necessary, add the trace option so you can see all the steps completed by the script. To set tracing, add the command: set -x at the top of the script.</description>
      <pubDate>Fri, 12 Oct 2007 21:10:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/crontab-issue/m-p/4085379#M309705</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2007-10-12T21:10:50Z</dc:date>
    </item>
    <item>
      <title>Re: crontab issue...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/crontab-issue/m-p/4085380#M309706</link>
      <description>&amp;gt;Bill: Absolutely expected for a script that was not written for the cron/at/batch environments&lt;BR /&gt;&lt;BR /&gt;at(1)/batch(1) guarantees it saves the environment.  Of course aliases are lost.&lt;BR /&gt;So batch(1) may not be a good simulation for cron jobs.</description>
      <pubDate>Sat, 13 Oct 2007 23:10:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/crontab-issue/m-p/4085380#M309706</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-10-13T23:10:44Z</dc:date>
    </item>
    <item>
      <title>Re: crontab issue...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/crontab-issue/m-p/4085381#M309707</link>
      <description>Dennis: at(1)/batch(1) guarantees it saves the environment.&lt;BR /&gt; &lt;BR /&gt;Oops, correct. Both at and batch copy the current environment in front of the job. Shell settings that do not get reported in the env command are not established for at and batch.&lt;BR /&gt;&lt;BR /&gt;cron on the other hand provides an absolute minimum environment. From the cron man page:&lt;BR /&gt; &lt;BR /&gt;      cron supplies a default environment for every shell, defining:&lt;BR /&gt; &lt;BR /&gt;           HOME=user's-home-directory&lt;BR /&gt;           LOGNAME=user's-login-id&lt;BR /&gt;           PATH=/usr/bin:/usr/sbin:.&lt;BR /&gt;           SHELL=/usr/bin/sh&lt;BR /&gt; &lt;BR /&gt;Not very much at all. Note that the shell that runs the script will be the POSIX shell /usr/bin/sh so if a different interpreter is needed, be sure that it is on line 1 such as:&lt;BR /&gt; &lt;BR /&gt;#!/usr/bin/ksh&lt;BR /&gt; &lt;BR /&gt;For testing, I would just put echo infront of the actual backup command so the script will run without watinign for the tape. Then put the script into crontab to run very soon. Add the set -x option to watch execution and don't redirect stdout or stderr.</description>
      <pubDate>Sun, 14 Oct 2007 13:09:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/crontab-issue/m-p/4085381#M309707</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2007-10-14T13:09:17Z</dc:date>
    </item>
  </channel>
</rss>

