Welcome Guest, Not a member yet? Register   Sign In
running cronjob in Linux CLI
#2

(This post was last modified: 10-29-2018, 12:14 AM by Pertti.)

You still need to run it via index.php and provide route that should be executed (notice the space after .php):

Code:
php -f /opt/bitnami/apache2/htdocs/index.php /cron_job

All the CodeIgniter related code is included in index.php file, like setting up folders and loading core functionality.

I'm also 99% certain you can skip -f flag, I'm pretty sure I only have to do php index.php, but it could be different for different PHP versions.

If that method does not work (some servers have different settings), you can provide directory/controller/method with d= c= and m= attributes:

Code:
php -f /opt/bitnami/apache2/htdocs/index.php c=cron_job
Reply


Messages In This Thread
running cronjob in Linux CLI - by richb201 - 10-28-2018, 08:57 PM
RE: running cronjob in Linux CLI - by Pertti - 10-29-2018, 12:13 AM
RE: running cronjob in Linux CLI - by richb201 - 11-02-2018, 12:37 PM



Theme © iAndrew 2016 - Forum software by © MyBB