Created
July 28, 2026 13:48
-
-
Save BigBlueHat/f72708b914c3d977d71abbef96f8b90c to your computer and use it in GitHub Desktop.
Cronjob worker for Cloudflare Pages building
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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