context in cron.Job.Run Is it possible?
Author: BreezessCreated Jun 5, 2020Updated Dec 4, 2025
I want to pass in the context in cron.Job.Run, is there any way?
return cron.WithChain(func(job cron.Job) cron.Job {
return cron.FuncJob(func() {
// There is a way to write context
job.Run()
// use context
})
})Source: robfig/cron