Here’s a simple cron job to warm up your website cache using
@daily /usr/bin/wget --directory-prefix=/tmp --spider --recursive --no-directories --quiet https://www.getpagespeed.com/
--spideris for not downloading anything. However, this directive results in files created and deleted. Thus the following directive is useful:
--directory-prefix=/tmpensures that temporary files will end up where they belong.
wgetto crawl your website recursively.
--no-directorieswill ensure no empty directories are left out after running our minimalistic crawler
--quietis just a good way to silence any output to avoid cron email being sent.