PHPackages                             websolutionfalcon/lockable-command - 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. [CLI &amp; Console](/categories/cli)
4. /
5. websolutionfalcon/lockable-command

ActiveLibrary[CLI &amp; Console](/categories/cli)

websolutionfalcon/lockable-command
==================================

A Laravel package for locking and unlocking command execution without code deployment. Perfect for temporarily disabling scheduled commands during server overload or maintenance.

v1.0.0(3mo ago)00MITPHPPHP ^8.1

Since Jan 26Pushed 3mo agoCompare

[ Source](https://github.com/websolutionfalcon/laravel-lockable-command)[ Packagist](https://packagist.org/packages/websolutionfalcon/lockable-command)[ Docs](https://github.com/websolutionfalcon/lockable-command)[ RSS](/packages/websolutionfalcon-lockable-command/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (7)Versions (2)Used By (0)

Laravel Lockable Command
========================

[](#laravel-lockable-command)

[![Latest Version on Packagist](https://camo.githubusercontent.com/2718b16e0430e2536ea26c98cf5aee00f17f58d7c32ccc07e7ae9482f9c3f991/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f776562736f6c7574696f6e66616c636f6e2f6c6f636b61626c652d636f6d6d616e642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/websolutionfalcon/lockable-command)[![Total Downloads](https://camo.githubusercontent.com/70915a59bb4e5d9ef239584045536c5fa18e6353b095c530b0890a9039e591c1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f776562736f6c7574696f6e66616c636f6e2f6c6f636b61626c652d636f6d6d616e642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/websolutionfalcon/lockable-command)

A simple Laravel package that allows you to lock and unlock command execution. Perfect for scenarios where you have commands running via cronjobs and need to temporarily disable them without deploying code changes. For example, if your server is overloaded by a scheduled command, you can simply lock it to prevent further executions until the issue is resolved.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require websolutionfalcon/lockable-command
```

Optionally, you can publish the config file with:

```
php artisan vendor:publish --tag="lockable-command-config"
```

This will create a `config/lockable-command.php` file where you can customize the lock file path and extension.

Usage
-----

[](#usage)

### 1. Creating a Lockable Command

[](#1-creating-a-lockable-command)

To make your command lockable, extend the `LockableCommand` class instead of the default Laravel `Command` class:

```
