I am going to make plugin, collecting post views from Google Analytics. The main idea is to get views per post and store them with post meta.
My blog has a lot of posts and google analytics returns data very slow. It is about 30min for example to collect all data.
Use Linux crontab to execute /cron.php file from my plugin folder. This file should contains something like:
wp_schedule_eventfunction to execute heavy query using wordpress core.
How do you think, what method more preferred and what props and cons.