<?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 sending mail in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/crontab-hp-ux/m-p/6704656#M603349</link>
    <description>&lt;P&gt;This works!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Thu, 05 Feb 2015 11:11:35 GMT</pubDate>
    <dc:creator>rdiaz</dc:creator>
    <dc:date>2015-02-05T11:11:35Z</dc:date>
    <item>
      <title>crontab HP-UX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/crontab-hp-ux/m-p/6702883#M603347</link>
      <description>&lt;P&gt;Hello every one,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My case is the following... I have configured my crontab for send email with aliases:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;##&lt;/P&gt;&lt;P&gt;# Alias for mailer daemon&lt;BR /&gt;MAILER-DAEMON&amp;nbsp;&amp;nbsp; : root&lt;BR /&gt;root&amp;nbsp;&amp;nbsp;&amp;nbsp; : l-sistemas.cron.ced@mydomain.com&lt;/P&gt;&lt;P&gt;# RFC 822 requires that every host have a mail address "postmaster"&lt;BR /&gt;postmaster&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : root&lt;/P&gt;&lt;P&gt;# Aliases to handle mail to msgs and news&lt;BR /&gt;nobody&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : /dev/null&lt;/P&gt;&lt;P&gt;# System Admistration aliases&lt;BR /&gt;operator&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : root&lt;BR /&gt;uucp&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : root&lt;BR /&gt;daemon&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : root&lt;/P&gt;&lt;P&gt;# Ftp maintainer.&lt;BR /&gt;ftp-bugs&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : root&lt;/P&gt;&lt;P&gt;# Local aliases&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- When I make a cron job, I receive TWO emails, when I have only one with a subjets, let me show you my job in crontab:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;40 4 * * * /export/backup/programas/sv0011/PortalAverroes-backup-NETBACKUP.sh | mailx -s "PortalAverroes-backup-NETBACKUP" root &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Like you see, I want receive the output of the script "PortalAverroes"; in fact I receive this, but twice:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First email with subject like I want: "PortalAverroes-backup-NETBACKUP"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Second email with subject like i dont want: "[l-sistemas.cron.ced@mydomain.com] cron"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you know how resolv this condition??&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In fact I tried place a { &amp;gt;/dev/null 2&amp;gt;&amp;amp;1 } condition, but in the body of the email of "cron" I receive the output like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;*************************************************
Cron: El mensaje anterior es la salida estándar
      y el error estándar de uno de sus comandos crontab:

/export/backup/programas/puck/salva-NETBACKUP.sh | mailx -s "Archivado de archivelog oracle y wal postgresql" root &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Feb 2015 09:42:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/crontab-hp-ux/m-p/6702883#M603347</guid>
      <dc:creator>rdiaz</dc:creator>
      <dc:date>2015-02-02T09:42:22Z</dc:date>
    </item>
    <item>
      <title>Re: cron sending mail</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/crontab-hp-ux/m-p/6703095#M603348</link>
      <description>&lt;P&gt;&amp;gt;When I make a cron job, I receive TWO emails&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You have two commands in your pipeline.&amp;nbsp; With 4 outputs and one of those is sent as stdin to mailx(1).&lt;/P&gt;&lt;P&gt;You are handling the stdout/stderr for mailx but not stderr for your script.&lt;/P&gt;&lt;P&gt;So you either need to redirect or duplicate it:&lt;/P&gt;&lt;P&gt;PortalAverroes-backup-NETBACKUP.sh 2&amp;gt;&amp;amp;1 | mailx -s "PortalAverroes-backup-NETBACKUP" root &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So it is cron(1m) that is sending that second mail, which would be more obvious to everyone if the message was in English.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Feb 2015 18:46:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/crontab-hp-ux/m-p/6703095#M603348</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2015-02-02T18:46:30Z</dc:date>
    </item>
    <item>
      <title>Re: cron sending mail</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/crontab-hp-ux/m-p/6704656#M603349</link>
      <description>&lt;P&gt;This works!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 05 Feb 2015 11:11:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/crontab-hp-ux/m-p/6704656#M603349</guid>
      <dc:creator>rdiaz</dc:creator>
      <dc:date>2015-02-05T11:11:35Z</dc:date>
    </item>
  </channel>
</rss>

