MaxLogic / maxCron

maxCron: Flexible, lightweight CRON compliant scheduler written in Delphi.
https://maxlogic.eu/portfolio/maxcron-scheduler-for-delphi/
BSD 3-Clause "New" or "Revised" License
7 stars 0 forks source link

MaxCron Bug #2

Open ifeel10060815 opened 3 hours ago

ifeel10060815 commented 3 hours ago

Do you have to pass the date like this: = trunc(dtDate.DateTime) + frac(dtTime.DateTime); The result obtained is correct, if direct dt := trunc(now) + frac(now); In parsing something like 0 15 10 15W * ? It is possible that such an expression will obtain a result that is different from the result of the Cron parsing tool on the Internet

MaxLogic commented 2 hours ago

which Cron parsing tool on the Internet do you use?

this: dt := trunc(now) + frac(now); is the same as this: dt := now;

I assume you have this trunc/frac from my demo? trunc() just ensures the TDateTime is just a TDate, meaning no time part. and frac() is just ensuring the result has no date part, but only time. As far as I remember, I had once problems with some control returning wrong values... those trunc/frac are there just to sanitise the values from the visual components.