Welcome Guest, Not a member yet? Register   Sign In
cron job execution problem
#1

[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
#2

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

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

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

any other method to execute cron??
#5

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

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

http://codeigniter.com/wiki/Category:Adv...ronScript/

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?
#7

[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.
#8

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

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




Theme © iAndrew 2016 - Forum software by © MyBB