Run the schedule task on PHP.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Schedule Component

Run the task on shcedule using PHP. This is not cron job or cron tab but it is the schedule tasks using PHP.
You may need cron job or not, in case that there is no cron job just include it in the main PHP file that always called when users visited the webpage.

Latest Stable Version License Total Downloads


$PhpSchedule = new \Rundiz\PhpSchedule\PhpSchedule();
$PhpSchedule->add('unique-name', 'https://mysite.localhost/page/to/works', ['12', '15']);// run on 12 (midday) and 15.

Or you can run task using your function/class.

$PhpSchedule = new \Rundiz\PhpSchedule\PhpSchedule();
$PhpSchedule->add('unique-name1', 'myFunction', ['12', '15']);// run on 12 (midday) and 15.
$PhpSchedule->add('unique-name2', ['myStaticClass', 'myStaticMethod'], ['12', '15']);// run on 12 (midday) and 15.
$MyClass = new MyClass();
$PhpSchedule->add('unique-name3', [$MyClass, 'myMethod'], ['12', '15']);// run on 12 (midday) and 15.

For more example, please look inside tests folder.