Welcome Guest, Not a member yet? Register   Sign In
Accessing Controller with CRON
#4

(This post was last modified: 11-18-2021, 12:51 PM by 68thorby68.)

Thanks for pointing me in the right direction. But the reference in the Codigniter manual doesn't seen to work.
I used the example line for line as in the manual (copy/paste the Tools controller and placed in my app/Controllers root) I then modified my cron command

/usr/bin/php /home/my-app/mydomain.co.uk/index.php tools message to >> /home/my-app/app/Controllers/logfile.php
output = Status: 404 Not Found

Then I amended the Controller name in the command to match the controller name in the filesystem (Tools - capitalised)
/usr/bin/php /home/my-app/mydomain.co.uk/index.php tools message to >> /home/my-app/app/Controllers/logfile.php
output = Status: 404 Not Found

I then add the cli route as described:
PHP Code:
$routes->cli('tools/message/(:segment)''Tools::message/$1'); 
and used in conjubction with the command above.

output = Status: 404 Not Found

and, as per the documentation "Everything else works exactly like a normal route definition:"
I set the route to 
PHP Code:
$routes->cli('dosomething''Tools::message'); 
and my command to /usr/bin/php /home/my-app/mydomain.co.uk/index.php dosomething >> /home/my-app/app/Controllers/logfile.php
output = Status: 404 Not Found
Any thoughts?
Reply


Messages In This Thread
Accessing Controller with CRON - by 68thorby68 - 11-17-2021, 10:37 AM
RE: Accessing Controller with CRON - by Secux - 11-17-2021, 02:20 PM
RE: Accessing Controller with CRON - by kenjis - 11-17-2021, 10:18 PM
RE: Accessing Controller with CRON - by 68thorby68 - 11-18-2021, 12:30 PM
RE: Accessing Controller with CRON - by kenjis - 11-18-2021, 04:06 PM
RE: Accessing Controller with CRON - by kenjis - 11-21-2021, 05:41 AM



Theme © iAndrew 2016 - Forum software by © MyBB