TL;DR cron works like this (see the man page): https://github.com/robfig/cron/blob/v2/spec.go#L164 It means that the dow and dom restrictions are ORed, not ANDed together.
I'd say to your original problem, that choose one restriction (say, dow), and restrict in the called function: https://play.golang.org/p/aVWj_HAPX9 2016. augusztus 16., kedd 9:58:56 UTC+2 időpontban kumargv a következőt írta: > > I tested but it is not working . > > https://play.golang.org/p/vN1q7kNcRF > > OUTPUT > > C:\Users\vijay\Desktop>go run cron.go > EVERY ONE MINUTE > second monday of every month > 3rd tuesday of every month > ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > EVERY ONE MINUTE > > On Thu, Aug 11, 2016 at 7:32 PM, Tamás Gulácsi <tgula...@gmail.com > <javascript:>> wrote: > >> // The first monday can be 1-7th, the second 8-14th day of the month. >> c.AddFunc("0 30 * 8-14 * 1", func() { fmt.Println("second monday of every >> month") }) >> >> // The first tuesday can be 1-7th, the second 8-14th, the third 15-22th. >> c.AddFunc("0 30 * 15-22 * 2", func() { fmt.Println("3rd tuesday of every >> month") }) >> >> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "golang-nuts" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/golang-nuts/XT0QD4hwkVM/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> golang-nuts...@googlegroups.com <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.