8 months ago

Schedule a Job from a Controller?

Posted 8 months ago by uccdev

So I've got a server I want to schedule certain functions on. I've got a controller and functions in it. And I've got a Job that dispatches commands.

I know that my scheduler cannot call controller functions, it must call a job.

I know that I can put functions inside my job file, though such seems redundant, especially following the advice from this link, that says to have controllers call jobs: https://laracasts.com/discuss/channels/laravel/call-controller-method-inside-a-job-handle-method

So what is the conventionally best way? Is what I'm asking for in the title possible or recommended?

Please sign in or create an account to participate in this conversation.