Welcome Guest, Not a member yet? Register   Sign In
how to run my function using cron or anything else
#11

[eluser]Clooner[/eluser]
What happens if you call it from the cli directly?
#12

[eluser]dhananjay[/eluser]
will they let me use cli on shared hosting?
#13

[eluser]Clooner[/eluser]
[quote author="dhananjay" date="1343623910"]will they let me use cli on shared hosting?[/quote]

I'm not sure about your host but having no cli is like having a tv without remote, sure it works but it there are better options out there!
#14

[eluser]NeoArc[/eluser]
In shared servers I use a copy of index.php, named index_cron.php:

Code:
// php-binary -d register_argc_argv=on $HOME/directory/index_cron.php controller action

if(!isset($argv)&&!count($argv)){
    exit();
}
//...

// The controller class file name.  Example:  Mycontroller
  $routing['controller'] = $argv[1];

// The controller function you wish to be called.
$routing['function'] = $argv[2];

//...
#15

[eluser]dhananjay[/eluser]
have made a file index_cron.php and pasted the code you mentioned above ...

now this is waht i m getting in email notification


Content-type: text/html
#16

[eluser]NeoArc[/eluser]
You need to copy the original index.php ci front controller file, and add/edit those lines.

If you do not want to receive emails, use this:
Code:
php-binary -d register_argc_argv=on $HOME/directory/index_cron.php controller action > /dev/null 2>&1
#17

[eluser]dhananjay[/eluser]
Thanks a lot its working now pretty good.....




Theme © iAndrew 2016 - Forum software by © MyBB