node-cron / node-cron

A simple cron-like job scheduler for Node.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Getting error on expression 0 6/12 * * *

henry-devlpr opened this issue · comments

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.

commented

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.