luceos Ah, thanks!.. That makes sense.
So I did some reading on it. Looking at the scheduler, it expects a command class, but how do I use a invokable class instead?
I tried putting my invokable class in the first argument, but that didn't work. I could probably use the invokable class to replace the function in the second argument (like i've seen in another example), but the invokable class I also want to use in another place in the codebase that's not scheduled (that's meant to be triggered manually).
So would the syntax look something like this?
(new Extend\Console())
->schedule(CommandClass::class, function (Event $event) {
$invokable = new MyInvokableClass()
$invokable('myArg')
$event->monthly();
} )
Is the command class in the first argument needed? Or could I pass null as a parameter?