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

Statistics are not working "out of the box" #43

Open
marcbria opened this issue Jul 12, 2021 · 1 comment
Open

Statistics are not working "out of the box" #43

marcbria opened this issue Jul 12, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@marcbria
Copy link
Collaborator

marcbria commented Jul 12, 2021

Docker image includes a helper script (/usr/local/bin/ojs-run-scheduled) that is supposed to process the statistics.
This script is called by cron hourly, so there is no need to use Anacron (poor's man cron) plugin.

The problem is this script calls the statistics parser as follows:

php /var/www/html/tools/runScheduledTasks.php

When the call requires a parameter:
https://docs.pkp.sfu.ca/admin-guide/en/statistics#2-configure-a-server-side-cron-job

Solution
Modify the script to process statistics as follows:
$ tools/runScheduledTasks.php plugins/generic/usageStats/scheduledTasks.xml

Improvement
Would be nice to accept arguments for this script... although if is called without params, keep processing as regular OJS logs (for backward compativity).

This make sense in case you like to manage an unified crontab outside the dockers and run them as follows $docker exec -it ojs_app_papers ojs-run-scheduled.

@marcbria
Copy link
Collaborator Author

BTW, an obvious temporary workaround is enable the "Acron" plugin.

@marcbria marcbria added the bug Something isn't working label Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant