PHPackages                             frankdejonge/locked-console-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. frankdejonge/locked-console-command

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

frankdejonge/locked-console-command
===================================

A symfony/console command decorator which locks.

3.1.1(9y ago)476.4k6[1 issues](https://github.com/frankdejonge/locked-console-command/issues)MITPHPPHP &gt;=5.5.9

Since Jan 3Pushed 9y ago3 watchersCompare

[ Source](https://github.com/frankdejonge/locked-console-command)[ Packagist](https://packagist.org/packages/frankdejonge/locked-console-command)[ RSS](/packages/frankdejonge-locked-console-command/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (4)Versions (11)Used By (0)

Symfony (or Laravel) Console Locked Commands
============================================

[](#symfony-or-laravel-console-locked-commands)

[![Author](https://camo.githubusercontent.com/bf87237874a25aebcf58b7f23dfdeb9098e58b5c011ca83aed2b6e519a392d84/687474703a2f2f696d672e736869656c64732e696f2f62616467652f617574686f722d406672616e6b64656a6f6e67652d626c75652e7376673f7374796c653d666c61742d737175617265)](https://twitter.com/frankdejonge)[![Build Status](https://camo.githubusercontent.com/a138892be6509613a235266866765ed2cc4f3be392a6490b2e37747746dc5107/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6672616e6b64656a6f6e67652f6c6f636b65642d636f6e736f6c652d636f6d6d616e642f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/frankdejonge/locked-console-command)[![Quality Score](https://camo.githubusercontent.com/70c96c6cb8a67885b08a798e75fd1ebfef95160cbba08799ebc12c12afae0662/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6672616e6b64656a6f6e67652f6c6f636b65642d636f6e736f6c652d636f6d6d616e642e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/frankdejonge/locked-console-command)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](license.md)[![Packagist Version](https://camo.githubusercontent.com/4429446f72105af1087fd038242e4bb53d4d8bb76dce37d9d701a51fd45f7bc6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6672616e6b64656a6f6e67652f6c6f636b65642d636f6e736f6c652d636f6d6d616e642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/frankdejonge/locked-console-command)[![Total Downloads](https://camo.githubusercontent.com/248a684364d166a482d65d5cf749ba15fd2f40208f410ae5e5582112bf9f7be4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6672616e6b64656a6f6e67652f6c6f636b65642d636f6e736f6c652d636f6d6d616e642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/frankdejonge/locked-console-command)[![Coverage Status](https://camo.githubusercontent.com/b5c5367b956307ff1f358699e7c1278d127f7790ab29bb8fa14b7cafb9bf71dd/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6672616e6b64656a6f6e67652f6c6f636b65642d636f6e736f6c652d636f6d6d616e642e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/frankdejonge/locked-console-command/code-structure)

In some cases, you'll want only one process of a certain command to be able to run at a time. The Command decorator supplied in this package makes this possible by using the LockHandler class from Symfony's Filesystem Component.

Credits
-------

[](#credits)

The idea wasn't initially mine, I stole it from @Seldaek.

Installation
============

[](#installation)

```
composer require frankdejonge/locked-console-command

```

Usage
=====

[](#usage)

All you have to do, is wrap the command:

```
