Skip to content
Advertisement

cronjob not running with codeigniter

I am sure the answer is right in front of me, but this is driving me crazy. I have searched high and low for the answer and can’t find it. Essentially I am trying to run a script through a cronjob on my server and nothing is working. However, when I run it with the PHP command line, it works fine.

The desired effect is to send an email periodically. So, when I run this:

JavaScript

The email sends and everything works fine. I am calling the email_controller controller and the index method. The index method isn’t necessary and works if I leave it off as well.

My crontab looks like this:

JavaScript

To run the script at 3:18 PM. This does not work. cron is running, I’ve checked.

Any ideas here?

Advertisement

Answer

3:18PM is 15:18 Also, don’t forget set full path to php interpreter:

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement