Cron [RuntimeException] Too many arguments

Hi All

I am having an error running when running the cron to get reports emailed.

My email reports stopped when I upgraded to 2.4

I have the correct path /usr/bin/php-cli /home/myusername/public_html/mysite/console core:archive – url=http://myinstallofpiwik.com/

This is what I get in my email error 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]

Any help or ideas would be appreciated

Many thanks

Mac

remove the space between – and url and it should work

Hi Matt

Thank you for your reply.

I have removed the spaces as recommended this is my new cron

/usr/bin/php-cli /home/myusername/public_html/mysite/console core:archive–url=http://myinstallofpiwik.com/

My error message has now changed to the one listed below

[InvalidArgumentException]
There are no commands defined in the “core:archive–url=http” namespace.
Did you mean this?
core

Matt - if you have a minute to point me in the right direction it would be greatly appreciated.

Many thanks

Mac

Hi

my cron is now running I recreated a space after core:archive as in the example below which solved the cron issue

/usr/bin/php-cli /home/myusername/public_html/mysite/console core:archive --url=http://myinstallofpiwik.com/

So anyone with a similar problem ensure there is no space between the – and url

Mac

I have a similar error. syntax:


su user -c "usr/bin/php /my/location/piwik/console core:archive --url=https://mywebsite.com/"

Error:


[InvalidArgumentException]                              
  There are no commands defined in the "core" namespace.

Any insight into this error?

Hello, I am receiving this error as well. How do we install the core:archive library? I am using Ubuntu.,

[InvalidArgumentException]
There are no commands defined in the “core” namespace.


/usr/bin/php5 /var/www/html/console core:archive --url=http://myinstallofpiwik.com/

Hi guys

Thanks for the report. can you please create a bug report in the tracker: Issues · matomo-org/piwik · GitHub and we will investigate. It works fine for most users but not for you, so we must fix it!