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

Invalid initial value error - When using cron format with 1-5 or 1-7 weekday. #32

Open
durnote opened this issue Sep 20, 2017 · 1 comment

Comments

@durnote
Copy link

durnote commented Sep 20, 2017

My cron string format uses 1-5 or 1-7 for week day part. But looks like not supported in your script.
Example: 15 9 * * 1-5 (which is 9:15 every day from Monday to Friday) is throwing an error: Invalid initial value.

I think this function in your code should be modified to handle 1-5 or 1-7.
If this is possible, could you please help or advise.

`
// check format of initial cron value

    var valid_cron = /^((\d{1,2}|\*)\s){4}(\d{1,2}|\*)$/

    if (typeof cron_str != "string" || !valid_cron.test(cron_str)) {

        $.error("cron: invalid initial value");

        return undefined;

    }`
@bakeevdr
Copy link

bakeevdr commented Jun 2, 2020

my expression "0 * / 6 * * *" does not pass

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

No branches or pull requests

2 participants