Search Postgresql Archives

Re: error messages not getting logged when running script from cron

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Nov 20, 2015 at 5:09 PM, anj patnaik <patna73@xxxxxxxxx> wrote:

> 0 20 * * * db_backup.sh 1> /dev/null 2>&1 | mail -s "backup cron" myemail@xxxxxxxx
>
> I am re-directing stderr to stdout and then sending that to email.

But you are redirecting stdout (and therefore also stderr) to
/dev/null -- therefore there is no body input to the mail command.

> I get an email nightly with that title, but no error messages.

In that case you will probably be fine if you remove "1> /dev/null"
from the command.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux