Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example does appear to work/parse? #14

Open
harlowja opened this issue Nov 11, 2020 · 1 comment
Open

Example does appear to work/parse? #14

harlowja opened this issue Nov 11, 2020 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@harlowja
Copy link
Contributor

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?

@mariusbancila mariusbancila self-assigned this Nov 12, 2020
@mariusbancila mariusbancila added the enhancement New feature or request label Nov 12, 2020
@mariusbancila
Copy link
Owner

mariusbancila commented Nov 12, 2020

You are correct, L and W are not currently supported and the readme.md is misleading about this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants