question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Invalid expression, loop limit exceeded" when using timezone in options

See original GitHub issue

Running into this in version 3.3.0:

var options = {
      currentDate: new Date(),
      tz: 'America/Chicago'
}

Code:

var cronParser = require('cron-parser')

let interval = cronParser.parseExpression("0 8 1,2 * *", options)
let next = interval.next()

Results in:

vue.runtime.esm.js?2b0e:1888 Error: Invalid expression, loop limit exceeded
    at CronExpression._findSchedule (expression.js?7a30:641)
    at CronExpression.next (expression.js?7a30:657)

It works if I remove the tz prop from the options object, but I need to specify the timezone. I also tried a string format for the date, but got the same error.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
egeersozcommented, Apr 14, 2021

@harrisiirak Appreciate the follow-up! After spending two full days on this issue, I decided to go with a server-side solution to fetch the next occurrence date asynchronously once the page loads. I’ll close this issue — thank you for your help.

0reactions
harrisiirakcommented, Apr 14, 2021

@egeersoz were you able to solve this, or is there any way I can further help to debug the issue, that you were experiencing?

Read more comments on GitHub >

github_iconTop Results From Across the Web

"ResizeObserver - loop limit exceeded" | API is never used
The answer of "This error means that ResizeObserver was not able to deliver all observations within a single animation frame. It is benign...
Read more >
ResizeObserver loop limit exceeded · Issue #38 - GitHub
Hello. We have a component that's using this hook with in it's default form (no custom callback) and have been getting a lot...
Read more >
Automate Desktop and Automate Plus/Ultimate - Fortra
Set limits on how many workflow instances are running at once, including options to set wait time, as well as how to respond...
Read more >
Schema reference for trigger and action types - Azure Logic ...
Schema reference guide for Workflow Definition Language trigger and action types in Azure Logic Apps.
Read more >
MySQL 8.0 Reference Manual :: 5.1.8 Server System Variables
System variables can be set at server startup using options on the command line or ... For more information, see Limiting Common Table...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found