How do I run Cron Jobs in PHP?

0

I wanted to use Cron Jobs in these php: titulos.php

<tr>
<td bgcolor="<?=$highlight?>">


<?
require('config.php');
$sqle = "SELECT * FROM tb_ads WHERE user='$last' and ident='$id'";
$resulte = mysql_query($sqle);        
$myrow = mysql_fetch_array($resulte);
mysql_close($con);


$time=$myrow['visitime'];

$crok1 = date(time());
$crok2 = date($time + (24 * 60 * 60));



if($crok1 >= $crok2)

{ 

?><?=$bold?><a href="view.php?ad=<?=$id?>" target="_blank"><?=$description?></a><?=$boldc?><?



 } else { ?><del><?=$description?><del><? }


?>


</td>
<tD bgcolor="<?=$highlight?>">
<?=$members?>       

</td>
<td bgcolor="<?=$highlight?>">

<?=$outside?>

</td>
<td bgcolor="<?=$highlight?>">

<?=$total?>

</td>
</tr>

titulosp.php

<tr>
<td bgcolor="<?=$highlight?>">


<?
require('config.php');
$sqle = "SELECT * FROM tb_ads WHERE user='$last' and ident='$id'";
$resulte = mysql_query($sqle);        
$myrow = mysql_fetch_array($resulte);
mysql_close($con);


$time=$myrow['visitime'];

$crok1 = date(time());
$crok2 = date($time + (24 * 60 * 60));



if($crok1 >= $crok2)

{ 

?><?=$bold?><a href="viewp.php?ad=<?=$id?>" target="_blank"><?=$description?></a><?=$boldc?><?



 } else { ?><del><?=$description?><del><? }


?>



</td>
<td bgcolor="<?=$highlight?>">
<?=$members?>       
</td>
<td bgcolor="<?=$highlight?>">
<?=$outside?>
</td>
<td bgcolor="<?=$highlight?>">
<?=$total?>
</td>
</tr>

I am using a PTC script that it restarts the ads of the site after 24 Hours more I wanted to disappear at 11:59 PM, For those who do not know what PTC Google search, Obs already created the Cron Jobs in CPanel: p>

59 23 * * * php -f /home/u844214382/cronjobs
    
asked by anonymous 13.04.2014 / 01:16

1 answer

4

Missing the file name you want php to open:

59 23 * * * php -f /home/u844214382/cronjobs/nomedoarquivo.php
# -------------------------------------------^^^^^^^^^^^^^^^^^
    
13.04.2014 / 08:01