php - Laravel 5.4 中的调度程序,Crontab 无法自动工作
问题描述
当我在终端中运行“php artisan schedule:run”时,它运行良好。当我将我的 crontab 配置为自动执行它时,它没有任何效果。Cron 不工作。
内核.php
$schedule->call(function () {
Log::info('Cron Started');
$test=Example::orderBy('updated_at', 'asc')->get();
})->everyMinute();
我也运行了这个脚本:
* * * * * cd /path-to-your-project && php artisan schedule:run >> /dev/null 2>&1
当我crontab -e
在 CMD 中使用时
No crontab for root - using an empty one No modification made
解决方案
推荐阅读
- python - 如何将已编译的 MIB 数据从 JSON 导出/转储到 SMIv2?
- linux - 如何从某些脚本生成子进程的 pid
- themes - Liferay 7.2:在显示页面模板中打开资产发布者 viewURL
- cmake - 如何正确地将依赖项从一个目标传递到下一个目标?
- azure - 将我的 Visual Studio 项目 zip 文件部署到天蓝色时出错“命令因意外错误而失败。这是回溯:”
- fortran - Fortran 程序中不可分类的 OpenMP 指令
- ubuntu-18.04 - 在 Ubuntu 18.04 中安装 clamav 后,clamscan 无法正常工作。谷歌搜索后我做了新鲜蛤蜊,下载失败
- javascript - 通过 prop 自定义组件中的动态文本
- api - 如何使用 IdentityServer4 对 MVC 5 应用程序进行身份验证
- .net - 此 64 位进程未能加载库 R.dll。本机错误消息是“操作成功完成”