[eluser]Bigil Michael[/eluser]
in your cpanel there is one field to set cron job
there u pasted code like this
php /home/cpanel username/public_html/cron.php
and set execution time
put cron.php inside public html
sample cron.php
Code:
<?php
define('BASEPATH',1);
include('system/application/config/database.php');
include('system/application/config/config.php');
$con = mysql_connect($db['default']['hostname'],$db['default']['username'],$db['default']['password']);
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db($db['default']['database'], $con);
$current = date("Y-m-d ");
mysql_query("update packages set status ='0' where valid_till = '$current'");
mysql_close();
?>