Add func parameter in `remove_job`
See original GitHub issueDescribe the solution you’d like Currently:
from apscheduler.schedulers.asyncio import AsyncIOScheduler
from apscheduler.triggers.cron import CronTrigger
scheduler = AsyncIOScheduler()
async def foo():
...
scheduler.add_job(foo, id="abc", CronTrigger(minute="10"))
scheduler.remove_job("abc") # will remove the job with the id "abc"
Enhancement:
from apscheduler.schedulers.asyncio import AsyncIOScheduler
from apscheduler.triggers.cron import CronTrigger
scheduler = AsyncIOScheduler()
async def foo():
...
scheduler.add_job(foo, id="abc", CronTrigger(minute="10"))
scheduler.remove_job(foo) # will remove the job with the func foo
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Remove-Job (Microsoft.PowerShell.Core)
The Remove-Job cmdlet deletes PowerShell background jobs that were started by the ... Or, use Remove-Job with the Force parameter to delete a...
Read more >gocron to add and remove task dynamically with parameter
you can handle the removal logic by deduplicating the function handlers. package main import ( "fmt" ) func main() { fn1 := func() ......
Read more >Arrow function expressions - JavaScript - MDN Web Docs
Remove the word "function" and place arrow between the argument and opening ... With arrow functions, since our add function is essentially ...
Read more >Pass by reference (C++ only) - IBM
The reference parameters are initialized with the actual arguments when the function is called. CCNX06A #include <stdio.h> void swapnum(int &i, int &j) {...
Read more >Python Functions - W3Schools
You can add as many arguments as you want, just separate them with a comma. The following example has a function with one...
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
Other user have different needs. Some software allow multiple users to add schedules dynamically, so the same function could be scheduled by multiple users separately.
Owh hmm. I haven’t seen any use cases of it roughly but can be in some rare cases. In our team none uses that in that way and all functions are used for registering one event only.
Quite unsure that why someone will use it in that way as
CronTrigger
is very flexible and can schedule any job easily.