定制 bashaus/solo-php 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

bashaus/solo-php

Composer 安装命令:

composer require bashaus/solo-php

包简介

Prevents multiple cron instances from running simultaneously

关键字:

README 文档

README

Prevents two of the same cronjobs from running at the same. It is useful with cron to make sure that a job doesn't run before a previous one has finished.

This script is a port of the original solo bash script written by Tim Kay. It has been ported to PHP to make it available on Windows servers.

Installation

Add the following to your composer.json.

{
    "require": {
        "bashaus/solo-php": "dev-master"
    },
    "config": {
        "bin-dir" : "bin"
    }
}

Usage

bin/solo [port] [exec*]
  • Argument port is an arbitrary port number to lock
  • Argument exec is a shell command to run

You can use it with cron like this:

* * * * * cd ...; bin/solo 24601 ./task.php arg1 arg2 arg3

The script task.php run every minute, but only if the previous invocation has finished. You can use any parameters, it doesn't have to run it every minute.

Further reading

Take a look at Tim Kay's documentation for more use cases and how to use solo.

Contributors

If you fork this project and create a pull request add your GitHub username, your full name and website to the end of list above.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-12-06

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固