【发布时间】:2014-01-15 17:09:10
【问题描述】:
我的 cron 作业有问题。我将 cron 作业设置为每五分钟运行一个文件,但那不起作用... Cron 作业没有运行文件,代码:
<?php
set_time_limit(1000000000000000);
include $_SERVER['DOCUMENT_ROOT'].'/includes/connect.php';
mysql_connect('localhost', 'root', '') or die(mysql_error());
mysql_select_db("database") or die(mysql_error());
$getinfo = mysql_query("SELECT * FROM something WHERE game_id = '2'") or die(mysql_error());
while($servers[] = mysql_fetch_assoc($getinfo)){
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
</head>
<body>
</body>
</html>
感谢所有愿意提供帮助的人...
【问题讨论】:
-
cron 的配置文件或 crontab 中的条目是什么样的?
-
/website/includes/something/thisfile.php
-
stackoverflow.com/questions/2689284/executing-php-with-crontab 有帮助吗?如果这是标准的
cron系统,它被设计为运行php命令之类的东西;它不会直接运行 php 源代码,但您可以将文件名作为参数提供给php命令..
标签: cron