Skip to content

Commit

Permalink
update job_id
Browse files Browse the repository at this point in the history
  • Loading branch information
wj-Mcat committed Nov 3, 2022
1 parent 053a0ee commit bcbc73a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/wechaty/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ def add_daily_job(
trigger = CronTrigger(
hour=hour
)

job = self.scheduler.get_job(job_id=job_id)
if job is not None:
self.scheduler.remove_job(job_id=job_id)
Expand Down Expand Up @@ -289,7 +290,8 @@ def add_interval_job(
func=handler,
trigger=trigger,
args=args,
kwargs=kwargs
kwargs=kwargs,
id=job_id
)


Expand Down

0 comments on commit bcbc73a

Please sign in to comment.