Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make tasks (cron) not only triggerd by visits of website with first (lowest) ID #10065

Closed
hpvd opened this issue Apr 18, 2016 · 4 comments
Closed
Labels
answered For when a question was asked and we referred to forum or answered it.

Comments

@hpvd
Copy link

hpvd commented Apr 18, 2016

At this time tasks (cron) seem to be trigged only by visits of first website
(lowest ID in manage websites)
If you run a multi-website piwik including some test environments, this may become not suitable.

An example:
you have one of your testing environment as the first website-ID (because one often starts with testing...)
and you does not use it frequently because you moved to an other testing site, you are on holiday..
=> no tasks are triggered (Please see attachment)

=> Maybe it would be possible to to trigger Tasks (cron) by a visit of ANY website...

2016-04-18_07h17_34

2016-04-18_07h17_55

@hpvd hpvd changed the title Make tasks not only triggerd by visits of website with first (lowest) ID Make tasks (cron) not only triggerd by visits of website with first (lowest) ID Apr 18, 2016
@tsteur
Copy link
Member

tsteur commented Apr 18, 2016

I presume you mean trigger the tasks during a tracking request?

I had a look at the code and this should not be bound to any specific website.

@hpvd
Copy link
Author

hpvd commented Apr 19, 2016

thanks for looking at the code.
Just discoverd this time it could not be solved simply visiting our old dev (first ID in list (ID=2)
I'm pretty sure last time this problem of tasks being shown/running only in the past (- X days) could be solved this way.

hmm so there must be another solution - any idea on restarting it?
There were no changes on server etc for 4-5 month so there must be a reason why they stopped working...

@hpvd
Copy link
Author

hpvd commented Apr 19, 2016

hmmm - is this fine on demo?

@tsteur
Copy link
Member

tsteur commented Apr 19, 2016

On demo we have a regular cron job that starts the tasks.

It should trigger the scheduled tasks during a regular HTTP tracking request (no bulk tracking request). The following conditions need to be met though:

  • Config record_statistics = 1 check config.ini.php if it's set
  • Piwik is installed which means there is a config/config.ini.php,
  • There is a database[username] configured in this config
  • The config does not contain installation_in_progress=1
  • No exception / error occurred during the tracking request (if you see data in Piwik for recent days the tracking should be fine)
  • Browser archiving is enabled (check in admin, if you see report data in Piwik for recent days this should be fine)

Apart from this maybe check if there is a custom value set for scheduled_tasks_min_interval in the config? There could be some more conditions but so far these are the basics

@mattab mattab closed this as completed Jul 14, 2016
@mattab mattab added the answered For when a question was asked and we referred to forum or answered it. label Jul 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it.
Projects
None yet
Development

No branches or pull requests

3 participants