Archive.php - Cron job not working - error message


#1

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.


(Karsten Krohn) #2

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

Karsten


#3

Hello,

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

Joe


(Karsten Krohn) #4

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


#5

I have the same problem.


#6

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?


(Karsten Krohn) #7

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.


#8

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


#9

I have this as
5 * * * *

is every 5 minutes to much also?


(Karsten Krohn) #10

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


#11

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…


(Paul Oldham) #12

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.)


#13

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

???


(Paul Oldham) #14

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


#15

@paulatthehug

Thank you!


(Matthieu Aubry) #16

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