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:
[[plugins]]
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 environment variable used to configure this plugin:
DEPLOYMENT_HOURS_EXPRESSION- A cron-like expression that expresses when a deployment can occur
DEPLOYMENT_HOURS_TIMEZONE- tz database value that expresses the timezone of the expression
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.