How to schedule Netlify builds and deploys with Cronhub Scheduler

With Cronhub Scheduler you can easily schedule Netlify builds or deploys. It will take you less than a minute to schedule builds on a recurring basis using any interval or cron expression schedule.

Below I will show you how I've done it for one of my sites on Netlify.

  1. Go to Netlify.com and log in to your account.
  2. Now that you're logged in, go to the site you want to schedule builds for. Then, under the Settings menu on the sidebar go to the Build & deploy section and click "Add build hook" button.
  3. After clicking "Add build hook" Netlify will generate a webhook that you can use to tell Netlify to run builds. Now that we know the URL and the HTTP Request details to trigger the build (see the screenshot below) our work with Netlify is done. We should go to Cronhub now to handle the scheduling part.

4. Go to Cronhub and sign in to your account. If you don't have an account you need to create one. Once you're logged in go to Schedulers and create a new Scheduler. You will see the following page.

Paste the webhook URL in Target HTTP URL field, choose POST and define your schedule. If everything looks good to you then hit the Save the button.

Please note that you can also pass trigger_branch and trigger_title values in your URL as arguments:

https://api.netlify.com/build_hooks/XXXXXXXXXXXXXXX?trigger_branch=testing&trigger_title=triggered+by+This+Awesome+Service
Specify the trigger branch and the title

5. This will create a new Cronhub Scheduler for you that will automate the scheduling part of your Netlify build.  

If you want to test the scheduler you can run the job at any point by using "Run Job Now" feature. Under your scheduler you can access all the past runs of your scheduler. This becomes a log for your scheduler.

That's all. Your scheduled builds should work just like that! Enjoy. ✌️

I hope this was helpful for you!