Configure scheduler with a config file #45145
Unanswered
WendellAdriel
asked this question in
Ideas
Replies: 2 comments 2 replies
-
If that's something we want, we should also think about a way to modify it by code so we can add functionality to our cms systems or api's. Also, storage in database would be nice. As in that case we also backup our configuration. |
Beta Was this translation helpful? Give feedback.
1 reply
-
I think this would be a good idea. I would even go further as to provide/implement different means of 'getting' the schedule (maybe drivers? something like from an API, from a config file, from a json file (which can also be fetched once for example) and so on :) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Introduction
Hello everyone, I was thinking that Laravel could have a way to define the scheduler in two ways:
Console/Kernel.php
JSON
orYAML
format at the root of the applicationHow it would work
In this approach, the framework would look first if the
scheduler.json
orscheduler.yml
file is present in the root and use it, if not it would use the configuration in theConsole/Kernel.php
file.Why
With this approach in a CI/CD pipeline we could put this file outside the versioned git, so we could update the scheduler without having to deploy code changes. Even if versioned, it offers a quick and intuitive way to modify the scheduled commands for an application.
Config file example
Observations
A command class could have defined some methods like:
when
andskip
that will be used if they are defined as the Truth Test Condition.before
,after
,onSuccess
andonFailure
for Task Hooks.pingBefore
andpingAfter
for conditional pingIDK if this is something that people would like, but IMO it would be a nice feature and if this is something that people are interested in, I would be really happy to help working on the implementation of this feature.
Beta Was this translation helpful? Give feedback.
All reactions