Skip to content

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

Description

@durnote

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;

    }`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions