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

"0 1 30 3 *" causes process to hang #919

Open
AndreMaz opened this issue Nov 15, 2024 · 0 comments
Open

"0 1 30 3 *" causes process to hang #919

AndreMaz opened this issue Nov 15, 2024 · 0 comments

Comments

@AndreMaz
Copy link

Description

The following snippet blocks the process

import { CronJob } from "cron";
const job2 = new CronJob(
  "0 1 30 3 *",
  function () {
    console.log("You will see this message every second");
  }, // onTick
  null, // onComplete
  false, // start
  "Europe/Lisbon" // timeZone
);

console.log(job2.nextDates(1));

Expression at crontab.guru
image

What causes the issue is the fact that in Portugal the daylight savings starts at Mar 30 so the 01:00 does not actually exist.

Expected Behavior

Next execution date to be returned or an error/ warning to be shown

Actual Behavior

The process hangs forever

Possible Fix

Steps to Reproduce

Context

Your Environment

  • cron version: 3.2.1
  • NodeJS version: v20.14.0
  • Operating System and version: Ubuntu LTS 24.04
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

1 participant