PHP code example of julesgraus / housekeeper
1. Go to this page and download the library: Download julesgraus/housekeeper library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
julesgraus / housekeeper example snippets
class MyClass implements \JulesGraus\Housekeeper\Contracts\CanDoHouseKeeping {
//Your regular methods and properties here.
public static function doHousekeeping(OutputStyle $output) {
//Put your houskeeping code here.
}
}
\JulesGraus\Housekeeper\Housekeeper::register([
MyClass::class
]);
\JulesGraus\Housekeeper\Housekeeper::schedule(function(\Illuminate\Console\Scheduling\Event $command) {
$command->twiceDaily(1, 13); //Run the task daily at 1:00 & 13:00
});
artisan housekeeper:run
$output