cron icon indicating copy to clipboard operation
cron copied to clipboard

Add support for future one-off jobs

Open trajano opened this issue 3 years ago • 1 comments
trafficstars

I am thinking that this is to allow pass in an ISO Date Time (with TZ) which gets parsed and used as a one off event. I am requesting more for https://github.com/mcuadros/ofelia/issues/177 but if it can be done in this module then it can offload the work away from Ofelia

trajano avatar Mar 03 '22 17:03 trajano

@trajano I made a fork that addresses almost all issues of this repo. https://github.com/alaingilbert/cron

This is how you could do what you want to do ->

_, _ = c.AddJob("* * * * * *", cron.Once(func() {
    fmt.Println("Will only be executed once")
}))

alaingilbert avatar Apr 16 '25 19:04 alaingilbert