Linux Apache中的清除Cron Job Cache

发布于 2025-01-30 19:55:21 字数 164 浏览 1 评论 0原文

从最后一天起,我面临一些有关Cron Job的问题。我想清除我的cron缓存。实际上,问题是服务器没有拾取我最新的shell命令设置,而是要接收我每一分钟的第一份工作。请让我知道我的最新克朗将如何运行。我认为这一定是缓存问题。我还在实例EC2上重新启动了Apache,但没有解决我的问题。 帮助将不胜感激。 谢谢。

I'm facing some facing some problems regarding cron job from last day. I want to clear my cron cache. Actually the problem is server do not picking up my latest shell command setup instead it is picking up my very first job that was every minute. Please do let me know how my latest cron will run. It must be cache issue I think. I also restart my apache running on instance ec2 but it didn't solved my problem.
Help will be appreciated.
Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

风透绣罗衣 2025-02-06 19:55:21

您应该每分钟运行Laravel调度程序,然后在kernel.php中创建一个任务,该任务根据您定义的时间表频率运行。

不要创建其他调用时间表:运行期望这将是唯一的调用。

在kernel.php中执行此操作意味着您的应用程序行为是在代码中设计的,并且不依赖于服务器上特定于任务的CRON作业设置。

https://laravel.com/docs.com/docs/docs/docs/9.x/scheduling# 在您的情况下,您将安排活动,然后添加- > averysixhours() ;

在时间表命令的末尾。

You should run the laravel scheduler every minute and then create a task in the kernel.php that runs according to the schedule frequency you define.

Don't create an additional call to schedule:run expecting that this will be the only invocation.

Doing it in the kernel.php means that your application behaviour is designed in code and is not dependent on task specific cron jobs setup on your server.

https://laravel.com/docs/9.x/scheduling#schedule-frequency-options

In your case, you would schedule the activity and then add ->everySixHours(); to the end of the schedule command.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文