You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating a job with a task that has variadic args, the validator in the library will expect the variadic args to be "1" argument (suspect to be a slice of that type). So creating a job with a task that has function of variadic arguments will always return ErrNewJobWrongNumberOfParameters.
To Reproduce
Steps to reproduce the behavior:
Create a function that has variadic args
Try create a cronjob from that
scheduler, _:=gocron.NewScheduler()
myfunc:=func(args...string) {
panic("This works")
}
// will have errorjob, err:=scheduler.NewJob(
gocron.CronJob("* * * * 1", false),
gocron.NewTask(myfunc), // the validator will expect num param to be 1 (slice of string)
)
Version
v2.2.1
Expected behavior
should be able to execute task with variadic parameters.
Additional context
The text was updated successfully, but these errors were encountered:
Describe the bug
When creating a job with a task that has variadic args, the validator in the library will expect the variadic args to be "1" argument (suspect to be a slice of that type). So creating a job with a task that has function of variadic arguments will always return
ErrNewJobWrongNumberOfParameters
.To Reproduce
Steps to reproduce the behavior:
Version
v2.2.1
Expected behavior
should be able to execute task with variadic parameters.
Additional context
The text was updated successfully, but these errors were encountered: