【发布时间】:2017-06-13 20:19:41
【问题描述】:
我无法使用 Valet 在本地服务器上运行我的 cron。这是我已经完成/完成的工作。
- 当我运行
php artisan command:mycommand时,命令运行。 - 当我运行
php artisan schedule:run时,命令运行。
输出:
Running scheduled command: '/usr/local/Cellar/php70/7.0.13_6/bin/php' 'artisan' game:resources > '/dev/null' 2>&1 &
根据 Laravel 文档,它说要将此添加到我的 crontab 中。
* * * * * php /path/to/artisan schedule:run >> /dev/null 2>&1
在我的项目目录中,这里是密码。
/Users/tjhillard/Projects/galaxywars
当我在我的 laravel 项目根目录中尝试 crontab -e 并保存时:
* * * * * php /Users/myusername/Projects/projectname schedule:run >> /dev/null 2>&1
...它不起作用。我已经尝试了这个 cron 命令的几种变体,但没有运气。知道我做错了什么吗?
我在 macOS 上使用 Valet。
【问题讨论】:
标签: laravel cron crontab laravel-5.4