You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When defining a cron for every X seconds, I get an exception with maximum call stack exceeded.
To Reproduce
install croner
require croner
create a cron which should trigger every X seconds
Example:
const { Cron } = require('croner')
// works as expected
new Cron('* * * * * *', () => console.log('test every second'))
// fails with maximum call stack exceeded
new Cron('/3 * * * * *', () => console.log('test 3 seconds'))
Uncaught RangeError: Maximum call stack size exceeded
at CronDate.findNext (/home/flo/dev/private/trading/autotrader/node_modules/croner/dist/croner.min.cjs:1:15327)
at CronDate.recurse (/home/flo/dev/private/trading/autotrader/node_modules/croner/dist/croner.min.cjs:1:16435)
at CronDate.recurse (/home/flo/dev/private/trading/autotrader/node_modules/croner/dist/croner.min.cjs:1:16993)
at CronDate.recurse (/home/flo/dev/private/trading/autotrader/node_modules/croner/dist/croner.min.cjs:1:16993)
at CronDate.recurse (/home/flo/dev/private/trading/autotrader/node_modules/croner/dist/croner.min.cjs:1:16993)
at CronDate.recurse (/home/flo/dev/private/trading/autotrader/node_modules/croner/dist/croner.min.cjs:1:16791)
at CronDate.recurse (/home/flo/dev/private/trading/autotrader/node_modules/croner/dist/croner.min.cjs:1:16993)
at CronDate.recurse (/home/flo/dev/private/trading/autotrader/node_modules/croner/dist/croner.min.cjs:1:16993)
at CronDate.recurse (/home/flo/dev/private/trading/autotrader/node_modules/croner/dist/croner.min.cjs:1:16993)
at CronDate.recurse (/home/flo/dev/private/trading/autotrader/node_modules/croner/dist/croner.min.cjs:1:16993)
Expected behavior
There's no exception when creating this cron and it gets triggered every X seconds.
System:
OS: Linux (Linux 6.8.0-45-generic #45-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 30 12:02:04 UTC 2024 x86_64 GNU/Linux)
Runtime: Node.js
Version: 18.20.4
croner: 8.1.2
The text was updated successfully, but these errors were encountered:
Describe the bug
When defining a cron for every X seconds, I get an exception with maximum call stack exceeded.
To Reproduce
Example:
Expected behavior
There's no exception when creating this cron and it gets triggered every X seconds.
System:
Linux 6.8.0-45-generic #45-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 30 12:02:04 UTC 2024 x86_64 GNU/Linux
)The text was updated successfully, but these errors were encountered: