Skip to content

Instantly share code, notes, and snippets.

@NickGreen
Created December 2, 2020 18:03
Show Gist options
  • Save NickGreen/d864f6265de1ddbea1da405ea247d8a8 to your computer and use it in GitHub Desktop.
Save NickGreen/d864f6265de1ddbea1da405ea247d8a8 to your computer and use it in GitHub Desktop.
Disable all autoupdates during business hours
<?php
// Place this snippet in config.php file
// Suspend all updates when outside of business hours, 9:00 AM to 5:30 PM
$updates_suspended = (date('Hi') < 0900 || date('Hi') > 1730);
define( 'AUTOMATIC_UPDATER_DISABLED', $updates_suspended );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment