the cron job is listed as this...
*/5 0 * * * php -f /home/a5******/public_html/pancron.php
pancron.php
Quote:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>
<body>
<?php
$url ='http://www.ctlinx.com/org/panprix/admin/php/pancron.php';
header('Location: '.$url);
?>
</body>
</html>
|
and that points to...
Quote:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>
<body>
<?
$user="a5818989_pan";
$password=Deleted by moderator;
$database="a5818989_pan";
mysql_connect("mysql7.000webhost.com",$user,$passw ord);
@mysql_select_db($database) or die( "Unable to select database");
$query="SELECT * FROM cron";
$result=mysql_query($query);
$num=mysql_num_rows($result);
$counter = mysql_result($result,$i,"counter");
$counter = $counter +1;
$query2 = "UPDATE cron SET counter = '$counter'";
mysql_query($query2);
mysql_close();
echo "$counter";
?>
</body>
</html>
|
I'm fairly new to cron jobs. I have tried it several ways including...
every 15 minutes, I used several ways to point to the script I need run (due to the fact that I read the script cannot be on the same page the cron job points to, I did have it set there too and it didn't work.
I know the script works as when I go to that page the counter goes up. I plan to create a racing game and will do so as soon as I can get the cron job to work properly, I will also be paying for the better hosting service but I want to get the game at least 90% done first.
What am I doing wrong here?
and thank you in advance for any help you can provide.