PHP code example of jiannei / laravel-schedule
1. Go to this page and download the library: Download jiannei/laravel-schedule 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/ */
jiannei / laravel-schedule example snippets
shell
$ php artisan vendor:publish --provider="Jiannei\Schedule\Laravel\Providers\LaravelServiceProvider"
shell
php artisan migrate
shell
+------------------------------------------------------------------------+--------------+--------------------------+----------------------------+
| Command | Interval | Description | Next Due |
+------------------------------------------------------------------------+--------------+--------------------------+----------------------------+
| '/www/server/php/80/bin/php' 'artisan' github:trending | */10 * * * * | 爬取 Github daily 趋势 | 2021-06-22 21:40:00 +08:00 |
| '/www/server/php/80/bin/php' 'artisan' github:trending --since=weekly | 59 23 * * * | 爬取 Github weekly 趋势 | 2021-06-22 23:59:00 +08:00 |
| '/www/server/php/80/bin/php' 'artisan' github:trending --since=monthly | 59 23 * * * | 爬取 Github monthly 趋势 | 2021-06-22 23:59:00 +08:00 |
+------------------------------------------------------------------------+--------------+--------------------------+----------------------------+