Question: Is it possible to target a specific job to stop rather than to stop the whole scheduler?
See original GitHub issueconst { ToadScheduler, SimpleIntervalJob, AsyncTask } = require('toad-scheduler')
const scheduler = new ToadScheduler()
const task = new AsyncTask(
'simple task',
() => { return db.pollForSomeData().then((result) => { /* continue the promise chain */ }) },
(err: Error) => { /* handle error here */ }
)
const job = new SimpleIntervalJob({ seconds: 20, }, task)
scheduler.addSimpleIntervalJob(job)
// when stopping your app
scheduler.stop()
New to toad-scheduler. Is there a way to target a specific job, for termination? scheduler.stop() seems to end all running jobs.
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
How to stop a scheduled task that was started using ...
When the scheduling for a bean has to be stopped, you can lookup the map to get the corresponding Future to it and...
Read more >Set a task start or finish date (constraint) for a task
You can't technically remove a constraint, but you can reset it to the default value, tying it to other tasks rather than to...
Read more >FAQs - Jobs at Target
Yes, you can apply for more than one role at a time and use the same candidate profile. However, we do recommend that...
Read more >10 Strategies for Better Time Management - UGA Extension
Learn 10 strategies for better time management, including knowing how to spend your time, setting priorities, using planning tools, getting organized, ...
Read more >Managing Flexible Work Arrangements - SHRM
A telemarketing operation or help-desk call center can be physically located anywhere. An organization might be able to attract a better and larger...
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
@jenseneducation-mattias-von-vogelsang Just published 1.2.0 with the stopping/starting functionality.
Thank you kindly for your implementation. I’ll try it out tomorrow. Closing this.