No data with probably configured Cron Auto-Archiving

Hi,

on 2 Websites, both running Woltlab Burning Board, one Vserver and one root, I’ve installed piwik, which is running fine.

Even after setting a cronjob (on the vserver via a webgui from the provider all-inkl , on the root via crontab -e , as described in the manual) for auto-archiving and disabling the reports via Browser, i get “not data” in piwik.

On the root server, I had a look a the syslog and found :


Apr  9 09:40:01 snake /USR/SBIN/CRON[9185]: (CRON) error (grandchild #9186 failed with exit status 127)
Apr  9 09:40:01 snake /USR/SBIN/CRON[9185]: (CRON) info (No MTA installed, discarding output)

I’ve set the time for the cronjob to 40 * * * * for testing.

As google :slight_smile: told me, exit status 127 means “command not found”. But as well, runnning the command via shell, everything works fine. I tried a several versions of the command in crontab, but without success. And yes, I did chmod 755 for the archive.sh :wink:

Thanks in advance for help…

The cron user may have a different PATH (e.g., using the PATH defined in /etc/environment instead of ~/.bashrc or ~/.bash_profile).

If your cron supports it, you can add something like: PATH=/usr/bin/php:$PATH to the crontab. Otherwise, create a wrapper script that sets the path correctly, and then calls archive.sh.

Thanks für your Reply. As your suggestion didn’t fix the problem, they helped me to find the right way ;).

I had to create a crontab with the user www-data, means from root:

su www-data
crontab -e
and inserting
5 * * * * /path/to/piwik/archive.sh

furthermore, after the script started, I had php error messages in the syslog. Seems like, piwik is lightly hungry on our installation (about 20k visits per day), after setting the memory limit in both php.ini to 1024M, piwik runs fine.

Although, I’ve updated to 1.3. without problems.