gronx icon indicating copy to clipboard operation
gronx copied to clipboard

Not firing task due

Open lordofscripts opened this issue 4 months ago • 4 comments

I have a task specified as */10 8-12 * * 1-5 and ran the application exactly at 12:10 on a Thursday. Yet it did not consider it due, despite the fact it was listed as such previously using the NextTick() method

lordofscripts avatar Aug 21 '25 17:08 lordofscripts

Apparently, if the code is not executing exactly at the ZERO second of that minute, the due attribute is not set, so basically it will never see it as due unless you are very lucky.

lordofscripts avatar Aug 21 '25 20:08 lordofscripts

It would be nice if it had a user option to use minute precision instead of the default seconds precision.

lordofscripts avatar Aug 21 '25 21:08 lordofscripts

sorry for late, if all the cron expressions are fulfill-able by minute precision then minute is used instead of second: https://github.com/adhocore/gronx/blob/main/pkg/tasker/tasker.go#L285

https://github.com/adhocore/gronx/blob/main/pkg/tasker/tasker.go#L261

adhocore avatar Oct 21 '25 07:10 adhocore

sorry for late, if all the cron expressions are fulfill-able by minute precision then minute is used instead of second: https://github.com/adhocore/gronx/blob/main/pkg/tasker/tasker.go#L285

https://github.com/adhocore/gronx/blob/main/pkg/tasker/tasker.go#L261

Then what would be wrong with the spec I used above?

lordofscripts avatar Oct 23 '25 16:10 lordofscripts