croncpp
croncpp copied to clipboard
Example does appear to work/parse?
I was trying some of the examples and saw the following happen:
Trying: 0 15 10 L * ?
terminate called after throwing an instance of 'cron::bad_cronexpr'
what(): stoul
Aborted (core dumped)
Program code (nothing crazy):
#include "croncpp.h"
#include <chrono>
#include <iostream>
#include <string>
int main(int argc, char** argv) {
std::string c = argv[1];
std::cout << "Trying: "<< c << "\n";
auto cexpr = cron::make_cron(c);
auto now = std::chrono::system_clock::to_time_t(std::chrono::system_clock::now());
auto next = cron::cron_next(cexpr, now);
std::cout << next << "\n";
return 0;
}
I also tried with the various oracle and quartz traits, but didn't seem to work.
Perhaps remove from the README.md if this format doesn't work?
You are correct, L and W are not currently supported and the readme.md is misleading about this.