PHPackages                             kicken/sleep-blocker - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. kicken/sleep-blocker

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

kicken/sleep-blocker
====================

Allows a PHP script to prevent the system from going to sleep

v0.2.0(2y ago)09MITPHPPHP ^8.1

Since Sep 28Pushed 2y ago1 watchersCompare

[ Source](https://github.com/kicken/sleep-blocker)[ Packagist](https://packagist.org/packages/kicken/sleep-blocker)[ RSS](/packages/kicken-sleep-blocker/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (3)Used By (0)

Sleep Blocker
=============

[](#sleep-blocker)

Allow PHP scripts to prevent a system from going to sleep.

Example
-------

[](#example)

Obtain a blocker by calling SleepBlocker::create. This will return a blocker implementation appropriate for the current system.

```
$blocker = Kicken\SleepBlocker\SleepBlocker::create();

```

Use the blocker methods preventSleep and allowSleep to disable or enable the system's ability to enter sleep mode.

```
$server = stream_socket_server('tcp://0.0.0.0:9');
while (true){
    $client = stream_socket_accept($server, null);
    if ($client){
        $blocker->preventSleep();
        do {
            $data = fread($client, 1024);
            if (!$data){
                fclose($client);
                $client = null;
            }
        } while ($client);
        $blocker->sllowSleep();
    }
}

```

Known issues
------------

[](#known-issues)

Currently only Microsoft Windows systems are supported.

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

954d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/93485c3a28acd5b5cc4649ef8081907889270d7c7a2832fa8aa19e31f9c688ac?d=identicon)[kicken](/maintainers/kicken)

---

Top Contributors

[![kicken](https://avatars.githubusercontent.com/u/6234547?v=4)](https://github.com/kicken "kicken (9 commits)")

---

Tags

windowssleeppowerwake

### Embed Badge

![Health badge](/badges/kicken-sleep-blocker/health.svg)

```
[![Health](https://phpackages.com/badges/kicken-sleep-blocker/health.svg)](https://phpackages.com/packages/kicken-sleep-blocker)
```

###  Alternatives

[cretueusebiu/valet-windows

A more enjoyable local development experience for Windows.

920115.0k](/packages/cretueusebiu-valet-windows)[jolicode/php-os-helper

Helpers to detect the OS of the machine where PHP is running.

212.8M4](/packages/jolicode-php-os-helper)[avadaneidanut/ldapquery

A light weight package for easily building LDAP advanced filter queries.

4717.8k](/packages/avadaneidanut-ldapquery)[lbaey/chromedriver

Utility for installing Chromedriver, whatever platform you are on, for use with Behat

1459.5k1](/packages/lbaey-chromedriver)[dmamontov/favicon

Class generation favicon for browsers and devices Android, Apple, Windows and display of html code. It supports a large number of settings such as margins, color, compression, three different methods of crop and screen orientation.

523.7k](/packages/dmamontov-favicon)[ycodetech/valet-windows

A more enjoyable local development experience for Windows. A Windows port of the popular Laravel Valet and a fork of cretueusebiu/valet-windows, with new features.

451.6k](/packages/ycodetech-valet-windows)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
