Timing task scheduling

1, the new entry in the server cron
crontab -e

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

 

2, the main task execution is defined in app / Console / Commands in
artisan command to create a file Test.php

php artisan make:command Test

 

3, the definition of all scheduled tasks App \ schedule method Console \ Kernel class

 

 


Manually run a check for abnormal
php artisan schedule: run // run scheduled tasks

See detailed documentation https://learnku.com/docs/laravel/5.8/scheduling/3924

Guess you like

Origin www.cnblogs.com/mmmzh/p/11347758.html