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

Getting error on expression 0 6/12 * * * #408

Open
henry-devlpr opened this issue Nov 20, 2023 · 1 comment
Open

Getting error on expression 0 6/12 * * * #408

henry-devlpr opened this issue Nov 20, 2023 · 1 comment

Comments

@henry-devlpr
Copy link

henry-devlpr commented Nov 20, 2023

Below error getting

~/node_modules/node-cron/src/pattern-validation.js:92
throw new Error(${patterns[2]} is a invalid expression for hour);
^

Error: 6/12 is a invalid expression for hour


I want to run cron 6am and 6pm everyday. Thanks in advance.

@Z2026
Copy link

Z2026 commented Dec 17, 2023

0 6,18 * * * would be the correct expression. Using this, the cron job will run at 6 and 18 hours, which are 6am and 6pm everyday.

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