Skip to content

Cron job stops after random hours/days #805

@github-anis-snoussi

Description

@github-anis-snoussi

Description

I have a node app running on a machine with 512mb of memory and 256vCPU on AWS, and I have a cron job (actually using Nestjs which in turn uses this package) that runs every second using node-cron.
After few days (doesn't always happen), the cron just stops working with no error or log.
In fact there was an identical issue reported before (#232) and was closed despite people still reporting the same behaviour.

Expected Behavior

cron job should not stop working, or at the very least throw an error ?

Actual Behavior

  • job stops randomly after few days, without any error / log
  • restarting the container fixes the issue

Possible Fix

No response

Steps to Reproduce

  • hard to reproduce, create a cron job that runs every second and leave it running for couple of days ?

Context

Your Environment

  • cron version: 2.4.1
  • NodeJS version: 18.18.2
  • Operating System and version: node:18.18.2-alpine3.17 docker image
  • TypeScript version (if applicable): 5.1.6
  • Link to your project (if applicable): -

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions