Linux 新建定时任务

mac2022-06-30  62

Linux 新建定时任务: 1、查看指定用户列表: crontab -u apache -l

2、切换至对应用户,这里是apache

su apache

3、新增定时任务:

crontab -e

写入下面代码:

* * * * * /usr/bin/php /home/www/rongyao_api/artisan schedule:run >> /dev/null 2>&1

(备注:上面这个 “/home/www/rongyao_api”换成自己的项目目录就可以啦)

转载于:https://www.cnblogs.com/myworld2018/p/9724581.html

相关资源:JAVA上百实例源码以及开源项目
最新回复(0)