@anonymous-matomo-user opened this Issue on June 26th 2009

archive.sh is normally run via cron so the output is sent by email. These normal status messages are not very useful IMHO but get annoying when received every day.

This patch prevents sending out mails:

--- archive.sh.old 2009-06-26 09:55:24.000000000 +0200
+++ archive.sh 2009-06-26 09:55:40.000000000 +0200
@@ -33,6 +33,5 @@

for period in day week year; do
CMD="$PHP_BIN $PIWIK_PATH -- module=API&method=VisitsSummary.getVisits&idSite=all&period=$period&date=last52&format=xml&token_auth=$TOKEN_AUTH";

  • $CMD
  • echo ""
  • $CMD > /dev/null
@robocoder commented on June 26th 2009 Contributor

The echo is needed when the script is executed from the shell.

To suppress the emails, use >/dev/null 2>/dev/null in your crontab.

@anonymous-matomo-user commented on June 26th 2009

I guess it is more often run via cron job. Isnt there a possibility to check wether the script is run via command line and to only output info in that case?

@mattab commented on June 26th 2009 Member

expected behavior is: an email is sent only when the archiving fails and returns an error. It works fine for me?

This Issue was closed on March 19th 2010
Powered by GitHub Issue Mirror