Comments (3)
I think the only way to solve this would be to eagerly initialise beans with @Scheduled
with expressions. Since it is a chicken and egg problem. Currently code doesn't create the instance until the job is actually run but a cron expression that references this
needs to create the instance to compute the schedule.
from micronaut-core.
so currently the cron expression is retrieved before the job instance is created so there is no way to refer to this
. You could create a global custom expression context to referred to another bean though.
from micronaut-core.
@graemerocher with the intent being to have one annotated method in an abstract class and all classes possibly having a different cron schedule in the annotation, so I'm not sure that that would quite work π€ If we referred to another bean, we'd probably still need to pass something like what the class name is in that case which I would assume would also reference this
(something like this.javaClass.simpleName
). Not a big deal either way, just thought I'd reach out and see if I was doing something wrong, bug, or just not feasible for the time being.
from micronaut-core.
Related Issues (20)
- Remove default environment HOT 8
- Consider avoid the scan βfile:config/" by default
- KotlinUtils causing nativeBuild to fail
- Micronaut is decoding the β+β in the path variable passed to the controller code HOT 2
- `IllegalStateException` on controller consuming multipart when error is caught by error handler
- Merge DefaultBeanContext and DefaultApplicationContext
- Always require @ReflectiveAccess if reflection is needed
- Donβt generate reflective Method lookup for executable methods HOT 2
- Multiple file uploads with more than one part HOT 2
- bug: Cannot run Groovy Script functions as a REST service since core 4.3.0 HOT 6
- Implement http-client error log for non-CompletableFuture responses HOT 5
- Adopt IANA standard for YAML Media Type HOT 1
- correctKeys in Map to Object converter has weird rules changing cases of props (coming from ConfigurationProperties) HOT 1
- Invalid bytecode generated for classes with interfaces HOT 1
- Warning 'Can't create array of wildcard' with stacktrace when compiling HOT 2
- Kotlin: Using withContext when throwing an error is being absorbed and the route return is like 200 instead of 500
- 4.4.x broken in certain cases on native image (with enums)
- Micronaut 4 with Logbook does not seem to work anymore HOT 4
- nativeTest fails with minimal/default Kotlin Gradle project created from micronaut launch HOT 3
- Build with GRPC KSP processing fails HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from micronaut-core.