Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter Tasks - Register Task from Module

(This post was last modified: 05-15-2024, 02:57 AM by ltarrant.)

Is it possible to add a scheduled task from a Module. 
I looked at the Modules Config Registrar class but this seems to only allow returning arrays of values.
Any guidance would be appreciated.

Why don't you use "app/Config/Tasks.php"?

I am attempting to move everything inside the module before I make it into a composer package to make it easier to roll out updates across multiple sites.

Maybe if "Config/Tasks.php" is only in one module, it will be used.
However, if "Config/Tasks.php" is in more than one module, only one of them will be loaded.
If there is "app/Config/Tasks.php", only that will always be loaded.

(This post was last modified: 05-16-2024, 12:24 PM by ltarrant.)

So simple! Moved App/Config/Tasks.php to my Module Config folder and it works.

I did try sticking a copy in the Module Config directory before but had not removed the copy in the App Config folder.

As you suggested the trick must be just having one Task.php config file.

Theme © iAndrew 2016 - Forum software by © MyBB