How to properly rebuild the metrics table?

I’m trying to rebuild my metrics table because I noticed that I’m missing some time in my reports.

I moved the archived usageStats to stage and used php tools/runScheduledTasks.php plugins/generic/usageStats/scheduledTasks.xml, but there is no change in the metrics table.

I run /usr/local/bin/php $HOME/public_html/tools/runScheduledTasks.php $HOME/public_html/plugins/generic/usageStats/scheduledTasksAutoStage.xml everyday using cron and those get processed just fine…

When you run tools/runScheduledTasks.php plugins/generic/usageStats/scheduledTasks.xml do the files move from “stage” to “archive”, or do they stay in “stage”, or do they move to “reject”?

What do you see in your scheduled task logs in “files/scheduledTaskLogs/Usage*-YYYYMMDD.log”, where the file ends with a hash and the human readable date?

Thanks, I finally realised what was wrong.

The logs showed the files as processed and they indeed moved from “stage” to “archive”. The problem was that in 2016 we changed our server to use https instead of http. So the previous entries had http and weren’t being recognized.

I manually replaced the target address on every file and now I’m reprocessing everything.

1 Like

Oy. You would think that just the change in protocol wouldn’t make the base_url match fail.

I tested it by changing the base_url back to the old one (with http) and it indexed just fine. So to be sure I just find and replaced the base address on all the logs.

You would, but it does :slight_smile: It’s bitten us at PKP|PS a few times, when migrating journals decide they want to also switch to SSL.