How to run a codeigniter driver in cron job with plesk panel?

0

I have a method in a controller within my site in codeigniter that extracts certain information from the database and sends it to me via email.

First of all clarify that in order to access the site you need a username and password and I do not know if this is preventing my method from being executed.

In the Scheduled Task I put this

/usr/bin/curl http://midominio.com/index.php/admin/avisos/send_email_avisos

When executing the task he says:

  

The task "/ usr / bin / curl    link "se   Completed correctly in 1 seconds. See details% Total% Received   % Xferd Average Speed Time Time Time Current Dload Upload Total Spent   Left Speed 0 0 0 0 0 0 0 0 -: -: - -: -: - -: -: - 0 100 7 0 7 0 0   27 0 -: -: - -: -: - -: -: - 28

But the Email is not sent.

I have tried it entering the system and it works perfectly but I need to do it from a cron job daily.

Now you are giving me this error:

Notice: Undefined index: HTTP_HOST in /var/www/vhosts/mydomain.com/application/config/config.php on line 28

A PHP Error was encountered

Severity: Notice Message: Undefined index: HTTP_HOST Filename: /var/www/vhosts/mydomain.com/application/config/config.php Line Number: 28

Backtrace: File: /var/www/vhosts/mydomain.com/application/config/config.php Line: 28 Function: _error_handler

someone can know what it is, I would appreciate it.

    
asked by elyera 22.12.2018 в 22:51
source

0 answers