Add a CronExpression.NEVER expression
See original GitHub issueIs there an existing issue that is already proposing this?
- I have searched the existing issues
Is your feature request related to a problem? Please describe it
I want to programmatically choose the expression that I’ll put in a @Cron()
and sometimes (in some environments) I don’t want the Cron job to execute.
Describe the solution you’d like
I’d like to have a new enum, name CronExpression.NEVER
, that I can put into the @Cron
Teachability, documentation, adoption, migration strategy
No response
What is the motivation / use case for changing the behavior?
The motivation is that it is a clean solution. An alernative would be to use the scheduler registry in main.ts to stop the cron job, but it is less flexible.
Issue Analytics
- State:
- Created a year ago
- Reactions:3
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Quartz: Cron expression that will never execute - Stack Overflow
If you're using spring 5.1+ (springBoot 2.1+) simply use "${your.cron.prop:-} and don't set the property to disable execution - see @Scheduled.
Read more >Ability to schedule cron that never occurs · Issue #724 - GitHub
Scheduling to cron expression like * * 31 Feb * isn't currently possible. If such cron expression is provided then CrontabSchedule.
Read more >A Guide To Cron Expressions - Baeldung
Simply put, cron is a basic utility available on Unix-based systems. It enables users to schedule tasks to run periodically at a specified ......
Read more >New in Spring 5.3: Improved Cron Expressions
While Spring generally prefers to maintain backward compatible, sometimes we do believe that starting from scratch is the best option. Usage.
Read more >Cron Trigger Tutorial
CronTrigger uses “cron expressions”, which are able to create firing ... This tutorial aims to take some of the mystery out of creating...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I would like, I will looking on it.
@origranot no sorry, would you like to do the PR?