<?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 / mail in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-mail/m-p/5041295#M432902</link>
    <description>Hello!&lt;BR /&gt;&lt;BR /&gt;To disable cron from mailing output to root add the following to the end of the&lt;BR /&gt;cron entry:&lt;BR /&gt;&lt;BR /&gt;   &amp;gt; /dev/null       (this redirects std. out to the bit bucket)&lt;BR /&gt;&lt;BR /&gt;   2&amp;gt; /dev/null      (this redirects std. error to the bit bucket)&lt;BR /&gt;&lt;BR /&gt;   &amp;gt; /dev/null 2&amp;gt;&amp;amp;1  (this redirects both std. out and std. error)&lt;BR /&gt;&lt;BR /&gt;Here are a couple of examples:&lt;BR /&gt;&lt;BR /&gt;   0 1 * * * /path/command [options] &amp;gt; /dev/null&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;   0 1 * * * /path/command [options] &amp;gt; /dev/null 2&amp;gt;&amp;amp;1&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Jaime.</description>
    <pubDate>Thu, 19 Apr 2007 06:11:32 GMT</pubDate>
    <dc:creator>Jaime Bolanos Rojas.</dc:creator>
    <dc:date>2007-04-19T06:11:32Z</dc:date>
    <item>
      <title>cron / mail</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-mail/m-p/5041292#M432899</link>
      <description>how can i disable the cron to send mail after the execution task?&lt;BR /&gt;&lt;BR /&gt;Thanks!!!</description>
      <pubDate>Thu, 19 Apr 2007 05:32:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-mail/m-p/5041292#M432899</guid>
      <dc:creator>HelderAfonso</dc:creator>
      <dc:date>2007-04-19T05:32:45Z</dc:date>
    </item>
    <item>
      <title>Re: cron / mail</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-mail/m-p/5041293#M432900</link>
      <description>You make sure that stdout and stderr are redirected, to /dev/null if you want.</description>
      <pubDate>Thu, 19 Apr 2007 05:49:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-mail/m-p/5041293#M432900</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-04-19T05:49:15Z</dc:date>
    </item>
    <item>
      <title>Re: cron / mail</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-mail/m-p/5041294#M432901</link>
      <description>can you brief the question &lt;BR /&gt;&lt;BR /&gt;if you want the cron entry to disable you can add a commit # in front of the line.</description>
      <pubDate>Thu, 19 Apr 2007 05:53:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-mail/m-p/5041294#M432901</guid>
      <dc:creator>Jollyjet</dc:creator>
      <dc:date>2007-04-19T05:53:04Z</dc:date>
    </item>
    <item>
      <title>Re: cron / mail</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-mail/m-p/5041295#M432902</link>
      <description>Hello!&lt;BR /&gt;&lt;BR /&gt;To disable cron from mailing output to root add the following to the end of the&lt;BR /&gt;cron entry:&lt;BR /&gt;&lt;BR /&gt;   &amp;gt; /dev/null       (this redirects std. out to the bit bucket)&lt;BR /&gt;&lt;BR /&gt;   2&amp;gt; /dev/null      (this redirects std. error to the bit bucket)&lt;BR /&gt;&lt;BR /&gt;   &amp;gt; /dev/null 2&amp;gt;&amp;amp;1  (this redirects both std. out and std. error)&lt;BR /&gt;&lt;BR /&gt;Here are a couple of examples:&lt;BR /&gt;&lt;BR /&gt;   0 1 * * * /path/command [options] &amp;gt; /dev/null&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;   0 1 * * * /path/command [options] &amp;gt; /dev/null 2&amp;gt;&amp;amp;1&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Jaime.</description>
      <pubDate>Thu, 19 Apr 2007 06:11:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-mail/m-p/5041295#M432902</guid>
      <dc:creator>Jaime Bolanos Rojas.</dc:creator>
      <dc:date>2007-04-19T06:11:32Z</dc:date>
    </item>
    <item>
      <title>Re: cron / mail</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-mail/m-p/5041296#M432903</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;mail resulting from cron execution indicates that the job has produced output that could not be redirected to e.g. a file.&lt;BR /&gt;Therefore, if you take care of redirecting all output to a file (or more files), there will be no reason for sending any mail.&lt;BR /&gt;&lt;BR /&gt;Example without redirection, which may produce mail:&lt;BR /&gt;00 9-15 * * 1-5 su sysadm -c /usr/local/bin/mail_top.sh &amp;gt;/tmp/mail_top.sh.yt&lt;BR /&gt;&lt;BR /&gt;Example with redirection:&lt;BR /&gt;00 9-15 * * 1-5 su sysadm -c /usr/local/bin/mail_top.sh &amp;gt;/tmp/mail_top.sh.yt 2&amp;gt;&amp;amp;1&lt;BR /&gt;&lt;BR /&gt;In the example with redirection you should pay attention to the fact that the shell evaluates redirection from left to right:&lt;BR /&gt;First, std. out is associated with the file /tmp/mail_top.sh.yt&lt;BR /&gt;Secondly, std. err ("2") is associated with whatever std. out ("1") is associated with. As std. out was already associated with the  file /tmp/mail_top.sh.yt then std. err will go to the same file.&lt;BR /&gt;&lt;BR /&gt;The example only show redirection from the two "normal" output channels, std. out and std. err. Technically, a job could produce output to other data channels, but let us for a start assume that this not the case!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;John K.&lt;BR /&gt;</description>
      <pubDate>Thu, 19 Apr 2007 06:30:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-mail/m-p/5041296#M432903</guid>
      <dc:creator>john korterman</dc:creator>
      <dc:date>2007-04-19T06:30:50Z</dc:date>
    </item>
    <item>
      <title>Re: cron / mail</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-mail/m-p/5041297#M432904</link>
      <description>resolved</description>
      <pubDate>Thu, 19 Apr 2007 06:36:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-mail/m-p/5041297#M432904</guid>
      <dc:creator>HelderAfonso</dc:creator>
      <dc:date>2007-04-19T06:36:00Z</dc:date>
    </item>
    <item>
      <title>Re: cron / mail</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-mail/m-p/5041298#M432905</link>
      <description>You neglected to assign any points to your answers.  See:&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/helptips.do?#33" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/helptips.do?#33&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Here is how to reopen a thread:&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/helptips.do?#41" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/helptips.do?#41&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt;John: a job could produce output to other data channels,&lt;BR /&gt;&lt;BR /&gt;cron only cares about stdout and stderr.</description>
      <pubDate>Thu, 19 Apr 2007 16:08:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-mail/m-p/5041298#M432905</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-04-19T16:08:17Z</dc:date>
    </item>
  </channel>
</rss>

