I want to schedule a cron job on Google App Engine to view my 5 main pages every 10 minutes or so to keep a current instance up and running and to increase page speed for users. I understand all of the basic syntax for creating a cron job but I am curious what the python would look like for that. Do I simply need to make 5 different cron jobs and have each one fetch a URL?
Share
To answer your specific question, such a cron.yaml could look like this:
where /refresh is a handler you’ve written in your app that is then called even N minutes automatically.
E.G. myapplication.appspot.com/refresh
There’s no need to refresh a specific page or more than one. Just having the handler called will keep your app alive.
But as others have noted, this is a bit much to keep an app permanently warm.