Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add configuration to disable @Schedule #7568

Open
sdelamo opened this issue Jun 10, 2022 · 2 comments
Open

Add configuration to disable @Schedule #7568

sdelamo opened this issue Jun 10, 2022 · 2 comments
Labels
type: enhancement New feature or request

Comments

@sdelamo
Copy link
Contributor

sdelamo commented Jun 10, 2022

It would be good if we allow users to disable @Scheduled behaviour. For example, I want to disable @Scheduled in my tests.

Users could do:

@Property(name = "micronaut.scheduled.enabled", value = StringUtils.FALSE)
@MicronautTest
class MetricsTest {
@sdelamo sdelamo added the type: enhancement New feature or request label Jun 10, 2022
@morki
Copy link
Contributor

morki commented Jun 10, 2022

Disabling CRON tasks for local development is another use case, now I am using @Requires with custom property on whole beans that use the @Schedule annotation and setting this property in build.gradle for run task. This would be much cleaner.

sdelamo added a commit to micronaut-projects/micronaut-guides that referenced this issue Jun 11, 2022
see: micronaut-projects/micronaut-core#7568

it changes fixRate and initialDelay to use kebap-case

beforeAll / afterAll static

better explanation for CrypoUpdateTest

add query value to rfc6570 template
sdelamo added a commit to micronaut-projects/micronaut-guides that referenced this issue Jun 11, 2022
see: micronaut-projects/micronaut-core#7568

it changes fixRate and initialDelay to use kebap-case

beforeAll / afterAll static

better explanation for CrypoUpdateTest

add query value to rfc6570 template
@alvarosanchez
Copy link
Member

Related: #7169

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants