Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including netlify-deployment-hours-plugin with all npm packages installed. Try it out:

var netlifyDeploymentHoursPlugin = require("netlify-deployment-hours-plugin")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

netlify-deployment-hours-plugin v0.0.10

Block deployment if outside of deployment hours.

CircleCI npmversion


A Netlify build plugin that blocks deployment if it is outside of deployment hours.


To install, add the following lines to your netlify.toml file:

package = "netlify-deployment-hours-plugin"

Note: The [[plugins]] line is required for each plugin, even if you have other plugins in your netlify.toml file already.

There are two inputs used to configure this plugin:

package = "netlify-deployment-hours-plugin"

  # A cron-like expression that expresses when a deployment can occur
  expression = "* * * * *"
  # tz database value that expresses the timezone of the expression
  timezone = "America/Toronto"

Both are passed into cron-allowed-range to determine if a deployment should proceed. See the cron-allowed-range documentation for more details on how to form the cron-like expression.

The inputs can be overridden with environment variables for scenarios where emergency deploys were required outside of regular deployment hours:

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free