Skip to content

Commit

Permalink
增加计划任务及readme说明
Browse files Browse the repository at this point in the history
  • Loading branch information
ellermister committed Mar 15, 2020
1 parent 97cee2d commit 9213593
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/Console/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ protected function schedule(Schedule $schedule)
{
// $schedule->command('inspire')
// ->hourly();
$schedule->command('post:sync')->everyTenMinutes();
}

/**
Expand Down
10 changes: 10 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,16 @@ php artisan admin:create
登录地址:http://localhost/login
```

### 5.设置计划任务

通过linux系统的计划任务来运行系统以及调度同步任务计划,目前同步功能10分钟进行一次。

通过 `crontab -e` 写入以下命令,其中路径需要自行替换。

```
* * * * * php /path-to-your-project/artisan schedule:run >> /dev/null 2>&1
```



## License
Expand Down

0 comments on commit 9213593

Please sign in to comment.