JayGee Posted Friday at 11:30 AM Share Posted Friday at 11:30 AM I'm building a custom module for project that will leverage LazyCron. I can't seem to find how you tell your module that LazyCron is required? I've tried adding the following to my getModuleInfo() 'requires' => [ 'LazyCron' ], and have also tried adding the following that ChatGPT suggested... but not sure if it has made up this syntax as I've not seen it before?! 'requires' => [ 'ProcessWire:LazyCron' ], Either way I get the error: ProcessModule: Error reported by web service: That module is not currently tracked by the modules directory In an ideal world I'd just enable the core module from my own module, is this possible? Link to comment Share on other sites More sharing options...
bernhard Posted Friday at 12:58 PM Share Posted Friday at 12:58 PM 1 hour ago, JayGee said: In an ideal world I'd just enable the core module from my own module, is this possible? You just need to call wire()->modules->get('LazyCron') somewhere in your module, then LazyCron will automatically be installed. 1 1 Link to comment Share on other sites More sharing options...
wbmnfktr Posted Friday at 09:24 PM Share Posted Friday at 09:24 PM Let's have a look here in the docs: <?php public static function getModuleInfo() { return array( 'title' => 'Hello World', 'version' => 101, 'author' => 'Ryan Cramer', 'summary' => 'Just an example', 'requires' => array("LazyCron", "AdminBar") // added this line ); ); 1 Link to comment Share on other sites More sharing options...
JayGee Posted Monday at 01:24 PM Author Share Posted Monday at 01:24 PM On 12/6/2024 at 12:58 PM, bernhard said: You just need to call wire()->modules->get('LazyCron') somewhere in your module, then LazyCron will automatically be installed. Nice thanks @bernhard - never realised it was that simple. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now