Skip to content

Commit 69e273a

Browse files
authored
Fixed the code snippets in README.
1 parent 73d5392 commit 69e273a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The Schedule method helps us schedule the task to run once at the specified time
1313
```go
1414
taskScheduler := chrono.NewDefaultTaskScheduler()
1515

16-
task, err := scheduler.Schedule(func(ctx context.Context) {
16+
task, err := taskScheduler.Schedule(func(ctx context.Context) {
1717
log.Print("One-Shot Task")
1818
}, WithStartTime(now.Year(), now.Month(), now.Day(), now.Hour(), now.Minute(), now.Second()+1))
1919

@@ -29,7 +29,7 @@ The fixed delay counts the delay after the completion of the last execution.
2929
```go
3030
taskScheduler := chrono.NewDefaultTaskScheduler()
3131

32-
task, err := scheduler.ScheduleWithFixedDelay(func(ctx context.Context) {
32+
task, err := taskScheduler.ScheduleWithFixedDelay(func(ctx context.Context) {
3333
log.Print("Fixed Delay Task")
3434
time.Sleep(3 * time.Second)
3535
}, 5 * time.Second)

0 commit comments

Comments
 (0)