Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linux Crobjob未在redhat服务器中自动运行_Linux_Laravel_Cron_Redhat_Kubernetes Cronjob - Fatal编程技术网

Linux Crobjob未在redhat服务器中自动运行

Linux Crobjob未在redhat服务器中自动运行,linux,laravel,cron,redhat,kubernetes-cronjob,Linux,Laravel,Cron,Redhat,Kubernetes Cronjob,我在redhat服务器环境中为root用户设置了cronjob,如下所示,在存储项目中键入crontab-e以删除文件 在我的laravel项目运行中,如果我运行php artisan schedule:run,但不是每5分钟自动运行一次,,,检查var/log/cron,我看到cronjob自动运行 您只需将以下Cron条目添加到服务器 * * * * * cd /path-to-your-project && php artisan schedule:run >>

我在redhat服务器环境中为root用户设置了cronjob,如下所示,在存储项目中键入crontab-e以删除文件

在我的laravel项目运行中,如果我运行php artisan schedule:run,但不是每5分钟自动运行一次,,,检查var/log/cron,我看到cronjob自动运行


您只需将以下Cron条目添加到服务器

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

更多信息检查已解决

1。确保您的时间(服务器站点),例如每30分钟运行一次

*/30****cd/项目路径和php artisan计划:运行

2。确保您的时间(laravel站点),例如00:30运行

30 0***


因此,如果您的项目(laravel)使用30mnt(例如30 0**)运行,那么您必须使用30mnt(/30****)设置服务器。

使用
php artisan schedule:run
ya我尝试使用php artisan schedule:run,但表中的数据仍然不更新。如果我在一台服务器Redhat中使用2个cronjob,您可以使用任意数量的cronjob。只需在
App\Console\Kernel
类中安排每个cronjob,并在服务器中运行上述命令。更多信息查询