kivagant/runonce 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

kivagant/runonce

Composer 安装命令:

composer require kivagant/runonce

包简介

Run any shell command only once (deny concurrent execution)

README 文档

README

Scrutinizer Code Quality

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.

Warnings

NO WARRANTY implied!

Only Unix is supported. This tool does not working neither in OSX nor in Windows. Tested in RHEL 7.

Installation

Download this repo somewhere or run.

composer require kivagant/runonce

Usage and examples

Basic usage:

 ./vendor/bin/runonce your-command

Verbose output:

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

Example 1:

Run first command:

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

Run another one: different options are considered as different processes.

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

Run the first command again:

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

Example 2:

More complex commands:

./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.

Contributing

Just fork and send me a pull request.

License

Apache License 2.0

统计信息

  • 总下载量: 26
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Apache
  • 更新时间: 2016-05-09

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固