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

cron/archive.sh writes error messages to stdout, but stdout is discarded with the default crontab entry #2239

Closed
anonymous-matomo-user opened this issue Mar 29, 2011 · 1 comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@anonymous-matomo-user
Copy link

archive.sh has:
echo "php binary not found. Make sure php5 or php exists in PATH."

the documentation suggests:

MAILTO="youremail@example.com"

#5 * * * * www-data /path/to/piwik/misc/cron/archive.sh > /dev/null

-----------------END CRON TAB--

When an error occurs (eg. php memory error, timeout) the error messages

will be sent to youremail@example.com.

so if php-cli is not available, the error message will be discarded...

so this should be:
echo "php binary not found. Make sure php5 or php exists in PATH." >&2

to print the message to stderr...

as a sidenote:
php notoriously prints it's error messages (like the memory/timeout errros mentioed in the documentation above) to stdout instead of stderr, so those would likely be discarded aswell...
Keywords: cron

@mattab
Copy link
Member

mattab commented Mar 29, 2011

(In [4227]) Fixes #2239 Thanks for the report tthuermer!

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.
Projects
None yet
Development

No branches or pull requests

2 participants