GrantLemons
GrantLemons

Reputation: 23

Setting a CRON job in VM (Vagrant) to run Codeigniter function?

I'm trying to create a CRON job in a Linux virtual machine (using Vagrant) that will run a PHP Codeigniter function every 10 minutes.

The Codeigniter project is located in the /var/www/ folder of the virtual machine.

I've tried many different variations of:

*/10 * * * *  /usr/bin/php /var/www/index.php cc processCCqueue

But nothing wants to work. In my case, cc is the controller, and processCCqueue is the function I want to run in the cc controller.

I've also tried wget and curl with no luck for either.

Any thoughts?

Upvotes: 0

Views: 2124

Answers (1)

UserBSS1
UserBSS1

Reputation: 2221

try with

 0/10 * * * * wget -O - http://127.0.0.1:8080 >/dev/null 2>&1 

Upvotes: 0

Related Questions