How do I run Cron Jobs in PHP?

Asked

Viewed 2,134 times

0

I wanted to use Cron Jobs in these php: 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>

php titulosp.

<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’m using a PTC script that it Restarts the site ads after 24 Hours more I wanted to reset at 23h 59, For those who do not know what PTC search in Google, OBS already created Cron Jobs in Cpanel:

59 23 * * * php -f /home/u844214382/cronjobs

1 answer

5

Missing by the name of the file you want php to open:

59 23 * * * php -f /home/u844214382/cronjobs/nomedoarquivo.php
# -------------------------------------------^^^^^^^^^^^^^^^^^

Browser other questions tagged

You are not signed in. Login or sign up in order to post.