atifaziz / NCrontab

Crontab for .NET
Apache License 2.0
913 stars 139 forks source link

Scheluded jobs missfire #104

Closed piotrszpruta closed 2 years ago

piotrszpruta commented 2 years ago

Scheluded jobs run 2 hours later than expected. For example: It should run every working day at 6:00 (6:00AM) cron expression: 0 6 1-5 - but it runs at 8AM

Tried already with seconds also, but no luck. Any help?

atifaziz commented 2 years ago

NCrontab does not do any job scheduling. It simply evaluates a crontab expression and computes occurrences of the represented schedule. I would look for time zone offset as a potential source of issue.

piotrszpruta commented 2 years ago

@atifaziz I don't see any stuff related to time zone in NCrontab documentation, or you think of different method?

atifaziz commented 2 years ago

That's right, not in NCrontab; it's agnostic. My suggestion was to look elsewhere, perhaps in the (job scheduling) code using NCrontab, and I was thinking of time zones because the two hours difference you mentioned sounds typical of a time zone offset/translation issue.

atifaziz commented 2 years ago

I'm going to close this an issue external to NCrontab. Feel free to re-open if you can demonstrate with code that it's a bug in NCrontab.