Is there an example of how to use Cloudflare Cron Triggers within Cloudflare Pages?
I want to set up an automated build for my website so it's updated once per 30 minutes. Based on documentation, I set up a trigger within my Cloudflare Pages project but it doesn't seem to show up at the UI.
Should Cron Triggers work with Cloudflare Pages? Is there a complete example available somewhere? As a workaround, I could set up cron elsewhere and trigger the build but it feels a bit cleaner to have this logic in the same projects.
4 Replies
Cron Trigers don't work with Pages. You're looking at Workers documentation which is completely seperate from Pages
ok, thanks. that makes sense. it's not always clear what's supported and what not. i hope you can consider adding cron support directly to pages one day 👍
They've mentioned wanting to add support before but I would imagine the biggest blocker is dealing with disabling them with old deployments/controls for if they should be active on preview branches/etc
But yea, you could make a simple Worker which just calls the deploy hook, or do it with Github Actions
yup, i'll do something like that as a workaround - maybe it's worth documenting. thanks a lot for fast turnaround