Closed Tickwick closed 6 years ago
I didn't take into account that type of malformed cron string, thanks for reporting.
It continues to throw an exception, however it is a more descriptive BadCronExpression exception that contains a message with the error.
Any plans on supporting that type of cron string in the future?
Sorry, I didn't realize that were more complicated expressions. I added in the latest commit an alternative cron function ccron that uses a different (included) library. This should work for you, let me know.
Thanks for the support, first a couple of minor issues:
e
var that throws warnings on compile.Second, as it stands now, due to the C lib include, this library is not header only anymore, any usage of ccron
requires compilation of ccronexpr.c
.
Yes you're right, I reset the last commit and moved it to a branch. I'd prefer to keep it header-only. If you want the functionality offered use the ccronexpr branch. The include path was correct given the include_directories entry in the cmakelists. I dropped the e
. Thanks.
cronScheduler.cron("*/5 * * * *", []() { Foo(); });
This leads to an "invalid stoi argument" exception, at least on MSVC 15.6. I think it's the responsability of the library to gracefully handle incorrect or unsupported arguments for its functions.