Skip to content

Instantly share code, notes, and snippets.

@BigBlueHat
Created July 28, 2026 13:48
Show Gist options
  • Select an option

  • Save BigBlueHat/f72708b914c3d977d71abbef96f8b90c to your computer and use it in GitHub Desktop.

Select an option

Save BigBlueHat/f72708b914c3d977d71abbef96f8b90c to your computer and use it in GitHub Desktop.
Cronjob worker for Cloudflare Pages building
const url = "...Pages Deploy Hook URL...";
export default {
async scheduled(event, env, ctx) {
const init = {
body: JSON.stringify({}),
method: "POST",
headers: {
"content-type": "application/json;charset=UTF-8",
},
};
const response = await fetch(url, init);
return new Response(await response.text());
},
async fetch(request, env, ctx) {
return new Response();
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment