Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

misc/cron/archive.sh shouldn´t cause mails to be sent out #829

Closed
anonymous-matomo-user opened this issue Jun 26, 2009 · 3 comments
Closed
Labels
Bug For errors / faults / flaws / inconsistencies etc. wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.
Milestone

Comments

@anonymous-matomo-user
Copy link

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
    done
@robocoder
Copy link
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
Copy link
Author

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
Copy link
Member

mattab commented Jun 26, 2009

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

@anonymous-matomo-user anonymous-matomo-user added this to the Piwik 0.4.2 milestone Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.
Projects
None yet
Development

No branches or pull requests

3 participants