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

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

Hi,
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.
Thanks,
Luke
Reply
#2

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

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.
Reply
#4

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.
Reply
#5

(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.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB