承接 eurojet/yii2-job 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

eurojet/yii2-job

最新稳定版本:v1.0.14

Composer 安装命令:

composer require eurojet/yii2-job

包简介

Component to yii2 for using cron job.

README 文档

README

A simple module to have cron-like jobs in your database. In addition to yii's commands, yii-job can be used to create on-the-fly asynchronous jobs. Different kinds of jobs are supported:

  1. Jobs with crontab that are triggered at defined times.
  2. Ad-Hoc jobs that are executed at a defined time (or as soon as possible).

To actually process the jobs you can use the JobCommand, which itself can be triggered by a sytem cron job. A common scenario is system a cron job that is executed once per minute to trigger JobCommand.

Database Installing

Run migration

yii migrate --migrationPath=@eurojet/yii2-job/migrations

Yii Installing

Mapping command job from this package to your configuration in main.php.

Run

If you want to trigger the job processing from the command line you still need a cron job that executes the JobCommand. It should be triggers like this:

yiic job

This is the index command which will sync your jobs in the config with your database and run all jobs that are due.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-05-16