Bosma / Scheduler

Modern C++ Scheduling Library
MIT License
266 stars 74 forks source link

Support proper cron expressions #17

Open omaralvarez opened 5 years ago

omaralvarez commented 5 years ago

It would be amazing if more complex cron expressions could be supported:

cron("*/5 * * * *", []() { std::cout << "every 5 min" << std::endl; });

I see that you have a branch with a C library. I have another suggestion:

https://github.com/mariusbancila/croncpp

C++17 and header only.

I love how simple this library is, with that addition it would be even better. Keep up the good work!

omaralvarez commented 5 years ago

I have already integrated it. I had to make a small change in croncpp in order to be able to compile in gcc 7.3.0.

I could create a merge request if you want.

https://github.com/omaralvarez/Scheduler

I have also modified the CMake to create install targets, so people can make install the library. I also have created a Conan repo:

https://github.com/omaralvarez/conan-Scheduler

I have a repo available in Bintray also, so the library can be easily installed:

https://bintray.com/omaralvarez/public-conan/Scheduler%3Aomaralvarez

Cheers!

deblauwetom commented 5 years ago

it's nice, but a pity it's not C++14 instead of 17... I tried to adapt it to compile with 14 but did not really succeed.