This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

lasellers3297
lasellers3297

So commands in app/start/artisan.php aren't being picked up. I see they are actually used in the cms, and there is some mention of registering them in plugins... The question is where do we register them so they can be used by artisan at SSH and most importantly, so they can be picked up for cron job execution?

Last updated

lasellers3297
lasellers3297

For anyone having the same issue in the future...

Looking for the keywords "console" and "command" didn't get me anywhere, but using "cron" gave me a few clues ... eventually, after digging through the source code itself I found in the vendor\october\rain\src\Cron a readme.md which ... seems to suggest an answer. Maybe. We'll see how that goes.

(This seems more complicated and non-standard than it should be though.)

that0n3guy
that0n3guy

I've not tested this... but you could probably point to your command class from the routes.php in your plugin folder... Don't know if this is the "best" way to do it... but it would probably work.

Update: I just noticed there are docs on creating your own command in your plugin.php: https://octobercms.com/docs/help/console#console-development

lasellers3297
lasellers3297

I noticed that reference in the plugin docs as well. And in the cronqueue class.

Ultimately, after thinking about it, the developers seemed to have made an effort to remove this stock laravel functionality so I might be fighting against future upgrades trying to reintegrate that ability.

So, thinking of it more as a separation of concerns issue, probably a separate vanilla laravel framework handling cron aspects would be the easiest and most maintainable path. :)

that0n3guy
that0n3guy

All the laravel stuff is still there, some of it is just used differently. I'll admit I've not used cron w/ october, but I use laravels queue for a couple projects.

You could easily create your own laravel bundle that would work on your october site if you wanted.

1-5 of 5

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.