Zory a30513060a frist há 10 meses atrás
..
example a30513060a frist há 10 meses atrás
src a30513060a frist há 10 meses atrás
README.md a30513060a frist há 10 meses atrás
composer.json a30513060a frist há 10 meses atrás

README.md

Crontab

A crontab with precision in seconds written in PHP based on workerman.

Install

composer require workerman/crontab

Usage

start.php

<?php
use Workerman\Worker;
require __DIR__ . '/../vendor/autoload.php';

use Workerman\Crontab\Crontab;
$worker = new Worker();

$worker->onWorkerStart = function () {
    // Execute the function in the first second of every minute.
    new Crontab('1 * * * * *', function(){
        echo date('Y-m-d H:i:s')."\n";
    });
};

Worker::runAll();

Run with commands php start.php start or php start.php start -d