# yii2-crontab-basic **Repository Path**: jianglibin/yii2-crontab-basic ## Basic Information - **Project Name**: yii2-crontab-basic - **Description**: 基于yii2-crontab扩展创建的一个简易开箱即用包 - **Primary Language**: PHP - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-10-27 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 简介 基于yii2-crontab扩展创建的一个简易开箱即用包 ## 安装 ```composer create-project godv/yii2-crontab-basic crontab-basic``` ## 运行 ``` WWW\github\yii2-console-basic>php yii crontab/drun run example/minute 每分钟运行一次 .----------------.-------------.------------------.------------------.--------.------------.--------------. | route | crontab_str | last_rundate | next_rundate | status | exec_count | exec_time(s) | :----------------+-------------+------------------+------------------+--------+------------+--------------: | example/minute | * * * * * | 2020-10-27 16:41 | 2020-10-27 16:42 | -- | 7 | 0.41 | | example/hours | 0 */1 * * * | | 2020-10-27 17:00 | -- | 0 | 0 | '----------------'-------------'------------------'------------------'--------'------------'--------------' ``` ## windows模拟linux下crontab服务 ```php faker-linux.php``` ``` WWW\github\yii2-console-basic>php faker-linux.php cmd: php yii crontab/drun, next_datetime: 2020-10-27 16:43 run example/minute 每分钟运行一次 .----------------.-------------.------------------.------------------.--------.------------.--------------. | route | crontab_str | last_rundate | next_rundate | status | exec_count | exec_time(s) | :----------------+-------------+------------------+------------------+--------+------------+--------------: | example/minute | * * * * * | 2020-10-27 16:42 | 2020-10-27 16:43 | -- | 8 | 0.43 | | example/hours | 0 */1 * * * | | 2020-10-27 17:00 | -- | 0 | 0 | '----------------'-------------'------------------'------------------'--------'------------'--------------' ```