Skip to content

VJzhou/timer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Timer

PHP 定时任务扩展,用于php-cli

编译

    ./travis/complie.sh

使用,详细可看Task.stub.php

  • 设置间隔时间

    $t->setTime(1);

  • run

    $t->run();

Demo

function test($a, $b)
{
    echo $a .PHP_EOL;
    echo $b .PHP_EOL;
}

$t = new Task;
$t->setTime(5); // 间隔5秒, type类型却省
$t->run('test', 'a参数', 'b参数');

About

a simple timer of php extension

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published