CodeIgniter Forums
cron job execution problem - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: cron job execution problem (/showthread.php?tid=41172)



cron job execution problem - El Forum - 04-30-2011

[eluser]Bigil Michael[/eluser]
i want to create a cronjob and it must executes in regular interval
in my older application i have created cron job and executed through cpanel

now my problem is that , here is no cpanel
so i dontknow how to execute the cron

my cron page is
Quote:<?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();
?>

this page is pasted inside the public html folder.

since here is no cpanel, i dont know how to call this page in a regular interval

can anyone help me???
urgent
thanks in advance


cron job execution problem - El Forum - 04-30-2011

[eluser]Bigil Michael[/eluser]
can any one help me?


cron job execution problem - El Forum - 04-30-2011

[eluser]Atharva[/eluser]
If you have ssh access, you can set it through crontab.


cron job execution problem - El Forum - 04-30-2011

[eluser]Bigil Michael[/eluser]
i didn't have access to ssh

any other method to execute cron??


cron job execution problem - El Forum - 04-30-2011

[eluser]Bigil Michael[/eluser]
can anyone help me??


cron job execution problem - El Forum - 04-30-2011

[eluser]Bigil Michael[/eluser]
i ganerated a cron job using

http://codeigniter.com/wiki/Category:Advanced::CronScript/

i dontknow where to put this code
Quote:00 02 * * * /usr/local/bin/php5 $HOME/system/scripts/clean_cache.php

can any one help me?


cron job execution problem - El Forum - 04-30-2011

[eluser]Atharva[/eluser]
You need to set this in crontab via ssh or cpanel. Since you don't have access to both, you need to ask someone to do this for you who have access to the server.


cron job execution problem - El Forum - 04-30-2011

[eluser]Bigil Michael[/eluser]
is it possible to do using command line(CLI)


cron job execution problem - El Forum - 04-30-2011

[eluser]Atharva[/eluser]
It is possible, but do you have access to the server?