Archive.php - Cron job not working - error message

Hello,

since auto update to 2.5.0 I get all time “cron daemon” message:

" [RuntimeException]
Too many arguments.

core:archive [–url="…"] [–force-all-websites] [–force-all-periods[="…"]] [–force-timeout-for-periods[="…"]] [–skip-idsites[="…"]] [–force-idsites[="…"]] [–force-periods[="…"]] [–force-date-last-n="…"] [–force-date-range[="…"]] [–concurrent-requests-per-website[="…"]] [–disable-scheduled-tasks] [–accept-invalid-ssl-certificate] [–xhprof]"

What can I do. I did for now deactivate the hourly cron job.

Thanks. Joe.

Hey Joe,
you’re not alone. Same issue here :frowning:

Karsten

Hello,

Thanks. This means the error is already known and they are working on it. Right?

Joe

I do not think so, because I’m not a Dev and I could not find anything similar to our problem on their bugtracker.

I have the same problem.

Is there a way to go back to previous version? Of course I do not have a separate piwik backup, only backup of whole ws. I also try to contact my Server Provider. May bee a php, host or Setting issue?

Looks like they changed something. On How to Set up Auto-Archiving of Your Reports - Analytics Platform - Matomo I see an additional parameter “core:archive”.
I never saw that before and do not have that im my crontab.

Updated my crontab, to
/usr/bin/php /var/www/html/console core:archive --url=[piwikURL]

Seems to work.

Yes! My Server host just sended me this link they found in Google. I will try.

http://forum.piwik.org/read.php?2,117902,117902

I have this as
5 * * * *

is every 5 minutes to much also?

Depends on how much traffic you have on your site(s), but is totally irrelevant to the initial problem.

Hello,

I did change cron now to:

/usr/bin/php -f /var/www/web3/html/XXXXXXXXXXX.net/piwik/misc/cron/archive.php --url=http://www.XXXXXXXXX.net/piwik/ > /dev/null

(XXXXXXXXX = Domain)

now. Seem to work. The space was the problem I did read.

–url=http://www.XXXXXXXXX.net/piwik/ > /dev/null
– url=http://www.XXXXXXXXX.net/piwik/ > /dev/null (before)

By the way: I have lees than 1K visitors day on all about 20 site I monitor with piwik. Is the cron every 5 minutes to much? Does it take then to much / often Server ressources? Thanks.

Why do you have /usr/bin/php /var/www/html/console core:archive --url=[piwikURL] ?
This is different from my…

I had that space too (I think it must have been in the old documentation) but they have also changed to console core:archive from archive.php as the latest documentation explains.

(I don’t remember seeing any release notes about this but when you hand crank archive.php it whines about being deprecated.)

Confused :frowning:

what is now ok?

/usr/bin/php -f /var/www/web3/html/mypiwikdomain.net/piwik/misc/cron/archive.php --url=http://www.mypiwikdomain.net/piwik/ > /dev/null

OR

/usr/bin/php -f /var/www/web3/html/mypiwikdomain.net/piwik/console core:archive --url=http://www.mypiwikdomain.net/piwik/ > /dev/null

???

The latter. If you use the former it will still work but it will whine about being deprecated as it starts up.

@paulatthehug

Thank you!

Sorry for bit confusing migration path. To clarify, please use the console script as it is documented here: How to Set up Auto-Archiving of Your Reports - Analytics Platform - Matomo