Send monthly report at specific day?

Is there any way to get the monthly report at one specific day and not at the first day of the month as a currently does?

It’s not possible yet

Even modifying the core with the setback that I have to do it over again every time that piwik gets updated?

Or perhaps with a specific task in the crontab file to execute the cron that generate the monthly report?

thanks in advance
regards

Hi @leandro.pc

maybe you could schedule an execution of an API call, which would execute ScheduledReports.SendReport method?

Let me know if this might solve your case! :wink:

1 Like

Hi @mgonera

I will do it and get back to you, though right now I don’t have a clue how to do that. I guess I must do some reading.

regards

Yes @mgonera that did the trick, your hint was very helpful and I’m thankful for that.

This is what I finally used
http://mysite.company.com/?module=API&method=ScheduledReports.sendReport&idReport=15&period=month&date=2016-01-25&&token_auth=secret_token_auth

The next thing is to use a variable into the date field according to the current month unless there is a better way.

1 Like

Seh, there is a better way. Just use today in the date field :yum:

1 Like

@leandro.pc Yes that also just came to my mind as I read your question :slightly_smiling: great! Nice to know you tackled this. Can I ask how did you end up scheduling the request? Is it through cron or some other way?

Sure, just put a line in the crontab file like this one:

59 23 24 * * root curl "http://piwik.site.com/?module=API&method=ScheduledReports.sendReport&idReport=16&period=month&date=today&language=es&token_auth=super_scret_token_auth

That’s all folks :wink:

2 Likes

Great, thanks for sharing! :slightly_smiling: