<?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 msg in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-msg/m-p/2853745#M94252</link>
    <description>If you look at /usr/sbin/cron executable ..&lt;BR /&gt;# strings /usr/sbin/cron|more&lt;BR /&gt;almost towards the bottom ..&lt;BR /&gt;..&lt;BR /&gt;/usr/bin/echo 'Subject: %s&lt;BR /&gt;' | /usr/bin/cat - "%s" | %s %s&lt;BR /&gt;cron&lt;BR /&gt;/usr/bin/mail&lt;BR /&gt;...&lt;BR /&gt;Meaning cron by default will email root of its stdout and stderr. If you do not want this email, you will have to redirect the stdout/stderr in the crontab file like suggested by the rest.</description>
    <pubDate>Wed, 27 Nov 2002 19:51:07 GMT</pubDate>
    <dc:creator>S.K. Chan</dc:creator>
    <dc:date>2002-11-27T19:51:07Z</dc:date>
    <item>
      <title>cron msg</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-msg/m-p/2853740#M94247</link>
      <description>Hi All!&lt;BR /&gt; i have a cron script that run all minutes from specifc hour, but sometimes the result is not important for me.&lt;BR /&gt;Can I disable cron messagem from specific script or all times it runs cron send me a msg?&lt;BR /&gt;Thanx.</description>
      <pubDate>Wed, 27 Nov 2002 19:09:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-msg/m-p/2853740#M94247</guid>
      <dc:creator>Vogra</dc:creator>
      <dc:date>2002-11-27T19:09:53Z</dc:date>
    </item>
    <item>
      <title>Re: cron msg</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-msg/m-p/2853741#M94248</link>
      <description>I'm not quite sure I understand what you are trying to do, but how about something like this:&lt;BR /&gt;&lt;BR /&gt;0-59 8-17 * * 1-5 /dir/script_to_run 2&amp;gt;&amp;amp;1 | mailx -s "Output from script" email@somewhere.com&lt;BR /&gt;&lt;BR /&gt;This will re-direct standard error to standard out and then e-mail you the output once the script finishes.&lt;BR /&gt;&lt;BR /&gt;Be aware that any redirection in the script itself will effect what you receive from this e-mail.</description>
      <pubDate>Wed, 27 Nov 2002 19:14:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-msg/m-p/2853741#M94248</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2002-11-27T19:14:13Z</dc:date>
    </item>
    <item>
      <title>Re: cron msg</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-msg/m-p/2853742#M94249</link>
      <description>Hello.&lt;BR /&gt;&lt;BR /&gt;You will need to redirect output of your program to /dev/null 2&amp;gt;&amp;amp;1:&lt;BR /&gt;00 * * * * myprog.sh &amp;gt; /dev/null 2&amp;gt;&amp;amp;1.&lt;BR /&gt;If you want to manage some log info - do it within the script/program you run.&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;0leg</description>
      <pubDate>Wed, 27 Nov 2002 19:17:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-msg/m-p/2853742#M94249</guid>
      <dc:creator>Oleg Zieaev_1</dc:creator>
      <dc:date>2002-11-27T19:17:20Z</dc:date>
    </item>
    <item>
      <title>Re: cron msg</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-msg/m-p/2853743#M94250</link>
      <description>If you don't want standard msgs emailed to you, you can do something like -&lt;BR /&gt;&lt;BR /&gt;* HH1-HH2 * * * &lt;YOUR command=""&gt; 1&amp;gt;/dev/null&lt;BR /&gt;&lt;BR /&gt;This way, if everything goes well, the standard output will go to /dev/null. If your script failed for any reason, you will get a msg.&lt;BR /&gt;&lt;BR /&gt;Is that what you want?&lt;BR /&gt;&lt;BR /&gt;...Manjeet&lt;/YOUR&gt;</description>
      <pubDate>Wed, 27 Nov 2002 19:19:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-msg/m-p/2853743#M94250</guid>
      <dc:creator>Kellogg Unix Team</dc:creator>
      <dc:date>2002-11-27T19:19:49Z</dc:date>
    </item>
    <item>
      <title>Re: cron msg</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-msg/m-p/2853744#M94251</link>
      <description>Hi!&lt;BR /&gt;I want to control what I will receive by script. I don't want cron send msg that my script ran...</description>
      <pubDate>Wed, 27 Nov 2002 19:36:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-msg/m-p/2853744#M94251</guid>
      <dc:creator>Vogra</dc:creator>
      <dc:date>2002-11-27T19:36:07Z</dc:date>
    </item>
    <item>
      <title>Re: cron msg</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-msg/m-p/2853745#M94252</link>
      <description>If you look at /usr/sbin/cron executable ..&lt;BR /&gt;# strings /usr/sbin/cron|more&lt;BR /&gt;almost towards the bottom ..&lt;BR /&gt;..&lt;BR /&gt;/usr/bin/echo 'Subject: %s&lt;BR /&gt;' | /usr/bin/cat - "%s" | %s %s&lt;BR /&gt;cron&lt;BR /&gt;/usr/bin/mail&lt;BR /&gt;...&lt;BR /&gt;Meaning cron by default will email root of its stdout and stderr. If you do not want this email, you will have to redirect the stdout/stderr in the crontab file like suggested by the rest.</description>
      <pubDate>Wed, 27 Nov 2002 19:51:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-msg/m-p/2853745#M94252</guid>
      <dc:creator>S.K. Chan</dc:creator>
      <dc:date>2002-11-27T19:51:07Z</dc:date>
    </item>
    <item>
      <title>Re: cron msg</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-msg/m-p/2853746#M94253</link>
      <description>Just modify the script that's sending you emails.  If you want to continue running the script every minute, but you only need a report every hour, then you can replace the relevant mail command.  For example if your mail command is:&lt;BR /&gt;&lt;BR /&gt;cat myoutput | mailx -s "my subject" myself@mycompany.com&lt;BR /&gt;&lt;BR /&gt;then replace it with something like this:&lt;BR /&gt;&lt;BR /&gt;if [ `date +%M` = 0 ]&lt;BR /&gt;then&lt;BR /&gt;cat myoutput | mailx -s "my subject" myself@mycompany.com&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;The mailx command will then be executed at every full hour.</description>
      <pubDate>Wed, 27 Nov 2002 19:53:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-msg/m-p/2853746#M94253</guid>
      <dc:creator>Mladen Despic</dc:creator>
      <dc:date>2002-11-27T19:53:12Z</dc:date>
    </item>
    <item>
      <title>Re: cron msg</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-msg/m-p/2853747#M94254</link>
      <description>I might have misunderstood.  I thought you were receiving emails internally from the script that's run by cron.  But if you are receiving emails from the cron itself, then S.K. Chan's comments are relevant.&lt;BR /&gt;&lt;BR /&gt;Mladen&lt;BR /&gt;</description>
      <pubDate>Wed, 27 Nov 2002 19:58:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-msg/m-p/2853747#M94254</guid>
      <dc:creator>Mladen Despic</dc:creator>
      <dc:date>2002-11-27T19:58:14Z</dc:date>
    </item>
  </channel>
</rss>

