2017 © Pedro Peláez
 

library runonce

Run any shell command only once (deny concurrent execution)

image

kivagant/runonce

Run any shell command only once (deny concurrent execution)

  • Wednesday, May 11, 2016
  • by KIVagant
  • Repository
  • 1 Watchers
  • 0 Stars
  • 15 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

RunOnce

Scrutinizer Code Quality, (*1)

About

RunOnce is the php-based Unix tool that help you to run any command only once. This tool will only execute command and will not waiting for result., (*2)

Warnings

NO WARRANTY implied!, (*3)

Only Unix is supported. This tool does not working neither in OSX nor in Windows. Tested in RHEL 7., (*4)

Installation

Download this repo somewhere or run., (*5)

composer require kivagant/runonce

Usage and examples

Basic usage:, (*6)

 ./vendor/bin/runonce your-command

Verbose output:, (*7)

 ./vendor/bin/runonce -v your-command

Example 1:, (*8)

Run first command:, (*9)

./vendor/bin/runonce sleep 10 && echo 'first launch' || echo 'already running';
> first launch

Run another one: different options are considered as different processes., (*10)

./vendor/bin/runonce sleep 20 && echo 'first launch' || echo 'already running';
> first launch

Run the first command again:, (*11)

./vendor/bin/runonce sleep 10 && echo 'first launch' || echo 'already running';
> already running

Example 2:, (*12)

More complex commands:, (*13)

./vendor/bin/runonce php ./cron.php -v=\"some string\" && echo 'first launch' || echo 'already running';
> first launch

./vendor/bin/runonce -v php ./cron.php -v=\"some string\" && echo 'first launch' || echo 'already running';
> Command was already executed with PID  20438
> already running

Dependencies

This tool based on the liip/process-manager., (*14)

Contributing

Just fork and send me a pull request., (*15)

License

Apache License 2.0, (*16)

The Versions

11/05 2016

dev-master

9999999-dev https://github.com/KIVagant/runonce

Run any shell command only once (deny concurrent execution)

  Sources   Download

Apache License v2.0

The Requires

 

by Eugene Glotov

shell pid once

10/05 2016

0.0.4

0.0.4.0 https://github.com/KIVagant/runonce

Run any shell command only once (deny concurrent execution)

  Sources   Download

Apache License v2.0

The Requires

 

by Eugene Glotov

shell pid once

10/05 2016

0.0.3

0.0.3.0 https://github.com/KIVagant/runonce

Run any shell command only once (deny concurrent execution)

  Sources   Download

Apache License v2.0

The Requires

 

by Eugene Glotov

shell pid once

10/05 2016

0.0.2

0.0.2.0 https://github.com/KIVagant/runonce

Run any shell command only once (deny concurrent execution)

  Sources   Download

Apache License v2.0

The Requires

 

by Eugene Glotov

shell pid once

10/05 2016

0.0.1

0.0.1.0 https://github.com/KIVagant/runonce

Provides functionality to recursively process PHP variables

  Sources   Download

Apache License v2.0

The Requires

 

by Eugene Glotov

shell pid once