Here is the extension on the previous cron-based solution that uses curl to store cookies so you can complete one step and then use the cookie again as an authenticated user in the next step. Therefore, if you put these lines in a script called "prepare_cache.sh"
rm /tmp/cookiejar curl --request POST -d "login=<username>" -d "password=<password>" -c /tmp/cookiejar http://yourwebpages.url/login curl --request GET -b -c /tmp/cookiejar http://yourwebpages.url/page_to_cache rm /tmp/cookiejar
replacing the login and password options with those that match the variables used in your login form, and obviously the URLs. I delete the cookiejar earlier to make sure that there is no file and delete it at the end, to make sure there is no cookie floating with access levels that it should not have.
Then you can call this script with the cron job:
*/15 * * * * /home/myname/prepare_cache.sh > /dev/null 2>&1
And hopefully this should work. It seemed like I was working for me when I tried.
bjpirt
source share