Home Preventing your site from idling out with Cloudflare workers
Post
Cancel

Preventing your site from idling out with Cloudflare workers

Azure might just put your app into idle state if it’s inactive for too long. The always on feature is available only for higher app plans.

However, the same functionality can be achieved by just making http calls with cloudflare workers.

Let’s just create a simple listener:

1
2
3
4
5
6
7
addEventListener("scheduled", event => {
  event.waitUntil(handleScheduled(event))
})

async function handleScheduled(event) {
  await fetch("https://summeli.com")
}

And then we just add a cron trigger to launch fetch request every 30 minutes.

This post is licensed under CC BY 4.0 by the author.

Hardening poorly configured services with Cloudflare workers

Updated the LAN routing machine

Comments powered by Disqus.