CodeIgniter Forums
Controller enquiry - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30)
+--- Thread: Controller enquiry (/showthread.php?tid=70232)



Controller enquiry - scalla - 03-11-2018

Good day, was going through the cli lib folder, then I came across a controller class in there called CommandRunner. but no doc to state it purpose/use.

can anyone help me figure that out??


RE: Controller enquiry - InsiteFX - 03-11-2018

It's the CLI Libraries Controller that runs the CLI Commands ( CommandRunner).

Look at the __construct in the BaseCommand file.


RE: Controller enquiry - scalla - 03-11-2018

(03-11-2018, 04:31 AM)InsiteFX Wrote: It's the CLI Libraries Controller that runs the CLI Commands ( CommandRunner).

Look at the __construct in the BaseCommand file.

yea, seen.. if i were to create a cronjob with it, how do i go about that??


RE: Controller enquiry - kilishan - 03-11-2018

I'm going to assume you're the same person that emailed me today so I'll just answer here. Sorry - can't give a full snippet, though.

You can create custom commands that can be run via a cronjob if you wanted to. Docs are here. There is not any task runner built in currently so you'd have to build that yourself if you wanted to manage multiple jobs from a single entry point. But that would be pretty simple to do. Or as complex as you want to make it. Smile


RE: Controller enquiry - scalla - 03-12-2018

(03-11-2018, 06:42 PM)kilishan Wrote: I'm going to assume you're the same person that emailed me today so I'll just answer here. Sorry - can't give a full snippet, though.

You can create custom commands that can be run via a cronjob if you wanted to. Docs are here. There is not any task runner built in currently so you'd have to build that yourself if you wanted to manage multiple jobs from a single entry point. But that would be pretty simple to do. Or as complex as you want to make it. Smile

a task tuner would be like that you created in sprintphp right??


RE: Controller enquiry - kilishan - 03-12-2018

Correct. That’s what I meant by task runner.


RE: Controller enquiry - scalla - 03-12-2018

(03-12-2018, 05:00 AM)kilishan Wrote: Correct. That’s what I meant by task runner.

oh cul