hostgator cron job not working


hostgator cron job not working

我有一个问题,使我的cron工作,

是我PHP文件中唯一的代码:

sendreport.php

mail("someone@somewhere.com", "test email", "test message");

下面是cpanel中的cron作业:

0 10 * * 1,2,3,4,5,6 php /home/username/public_html/foldername/sendreport.php

我正在使用hostgator.

cron作业应该从周一、周二、周三、周四、周五和周六每10点运行一次,但似乎不工作。

我想知道我做的是否正确?

这与您的代码无关。Hostgator阻止cronjob的运行频率超过每15分钟一次。(是的,我知道这已经快一年了-这是给未来的人的)

Cron Job Limits

Shared and Reseller

运行cron作业的频率不能超过每15分钟。

裁判:https://www.hostgator.com/help/article/what-are-cron-jobs

再加上Justin的话。根据这篇文章,经销商最多只能每15分钟发一次火。