8000 [BUG] - Cannot add a new job after deleting the updated job · Issue #193 · go-co-op/gocron · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
[BUG] - Cannot add a new job after deleting the updated job #193
Closed
@Chen840302

Description

@Chen840302

Describe the bug

Hi~ I am glad to #190 is fixed ,
But after I try to delete the updated job,
it will not be able to do other jobs.

This is my code

	s := gocron.NewScheduler(time.Local)
	s.WaitForScheduleAll()

	gocronJob , _ := s.CronWithSeconds("*/3 * * * * *").SingletonMode().StartAt(time.Now().Local().Add(time.Second *3)).Do(job1.task, "123")
	s.StartAsync()
	x, _ := s.Job(gocronJob).CronWithSeconds("*/8 * * * * *").Update()
	time.Sleep(time.Second * 10)
	s.RemoveByReference(x)
	s.CronWithSeconds("*/11 * * * * *").SingletonMode().Do(job1.task, "777")

To Reproduce

Steps to reproduce the behavior:

  1. Create a job1
  2. Update the job1
  3. Remove the job1
  4. Create a job2

This is error report.
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0