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)012MITPHPPHP ^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 today

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

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

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

1008d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6234547?v=4)[Keith Maika](/maintainers/kicken)[@kicken](https://github.com/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.1k](/packages/cretueusebiu-valet-windows)[adldap/adldap

A PHP LDAP Library for Active Directory Manipulation

424171.8k9](/packages/adldap-adldap)[jolicode/php-os-helper

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

213.3M6](/packages/jolicode-php-os-helper)[avadaneidanut/ldapquery

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

4718.5k](/packages/avadaneidanut-ldapquery)[devium/processes

This package is used to get a list of running processes on Windows or Unix-like systems, even Darwin

2432.5k](/packages/devium-processes)[lbaey/chromedriver

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

1459.7k1](/packages/lbaey-chromedriver)

PHPackages © 2026

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