Welcome Guest, Not a member yet? Register   Sign In
Cronjob via HTTP
#7

@Silentium:
Yes, this is what I know already, but I tested it once with http and with the file method. The file method gave me an error right away, because /path/to/index.php cronjobs update is not a file.

For the http request I created this method in the cronjobs Controller:

PHP Code:
   public function update_news_until_data()
 
   {
 
       if($this->input->is_cli_request() === TRUE)
 
           echo 'cronjob ausgeführt';
 
       else
            echo 
'kein cli request';
 
   


when executing it through the cronjob (yeah, I can directly execute it via the interface) i get 'kein cli request' = no cli request.

Or did I get you wrong?

@CroNiX:
Hm.. the key could be a possibility, but I think I will wait for some more feedback, but I keep this in mind. Wink

For the other answer.. I don't think it will do some difference, because my webhost can execute cronjobs via http and make them in a interval. Tongue The problem is, that everyone else who knows the controller/method, can execute it, and this is something i don't want.
-.-.-.-.-.-.-.-.- Angel -.-.-.-.-.-.-.-.-
Reply


Messages In This Thread
Cronjob via HTTP - by Urastor - 05-06-2015, 10:01 AM
RE: Cronjob via HTTP - by ivantcholakov - 05-06-2015, 11:24 AM
RE: Cronjob via HTTP - by Urastor - 05-06-2015, 11:53 AM
RE: Cronjob via HTTP - by CroNiX - 05-06-2015, 02:38 PM
RE: Cronjob via HTTP - by silentium - 05-06-2015, 02:42 PM
RE: Cronjob via HTTP - by CroNiX - 05-06-2015, 02:44 PM
RE: Cronjob via HTTP - by Urastor - 05-06-2015, 03:13 PM
RE: Cronjob via HTTP - by CroNiX - 05-06-2015, 03:31 PM
RE: Cronjob via HTTP - by Urastor - 05-06-2015, 03:51 PM
RE: Cronjob via HTTP - by Lolivaress - 05-06-2015, 07:42 PM
RE: Cronjob via HTTP - by Lolivaress - 05-07-2015, 11:05 AM
RE: Cronjob via HTTP - by Nash - 05-11-2015, 11:54 PM



Theme © iAndrew 2016 - Forum software by © MyBB