简体   繁体   English

已删除cron作业时运行的php脚本

[英]php script running when cron job already deleted

I am doing a testing a cron-job on a shared hosting on hostgator . 我正在在hostgator上的共享主机上测试cron-job I am using this simple and short php script which sends email everytime it gets executed via cron. 我正在使用这个简单而简短的php脚本,该脚本每次通过cron执行时都会发送电子邮件。 To keep things explicit, I record the timestamp and timezone and send to email as subject and message. 为使内容清晰明了,我记录了时间戳和时区,并以主题和消息的形式发送到电子邮件。

$message = 'Default timezone : ' . date_default_timezone_get(); 
$subject = 'DateTime : ' .date('m/d/Y H:i:s', time()); 
mail("xxxxxxxxxxxxxxx@gmail.com", $subject, $message);

*/20 * * * * wget http://path/to/cron.php test script executed every 20 minutes. */20 * * * * wget http://path/to/cron.php每20分钟执行一次*/20 * * * * wget http://path/to/cron.php测试脚本。


ISSUE : I deleted the cron job from cpanel about two hours ago and I am still getting emails with the rate of roughly around one email per minute. 问题:大约两个小时前,我从cpanel删除了cron作业,但我仍收到每分钟大约一封电子邮件的电子邮件。 What is happening here, where should I look for the mistake ? 这是怎么回事,我应该在哪里寻找错误?

在此处输入图片说明

Note : Please state the reason for downvote if you must, so i know the mistake in my question and have a chance to correct it. 注意 :如果需要,请说明拒绝投票的原因,因此我知道问题中的错误,并有机会予以纠正。

You can try changing the name of the script to corn1.php or else. 您可以尝试将脚本的名称更改为corn1.php或其他。

There may be some conflict with other codes, or maybe someone else came to know about that script. 可能与其他代码有冲突,或者也许其他人对此脚本有所了解。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM