Skip to content

Opt out "Possible blocking IO or high CPU user..." check #485

Description

@fraprion

Our app is running on an underpowered edge device. During the weekly backup (triggered by node-cron) we expect high CPU and I/O load.

After upgrading node-cron from 3.0.3 to 4.2.1, the weekly backup is no longer executed. Instead, we see the following warning:

[NODE-CRON] [WARN] missed execution at TIME! Possible blocking IO or high CPU usage in the same process used by node-cron

In this closed issue the following workaround was suggested:

const task = cron.schedule('* * * * *', () => {
  // ...
});

task.on('execution:missed', () => {
  task.execute();
});

However, as far as I understand, task.execute() is effectively the same as cron.schedule, so this does not solve the problem for us.
Another suggestion was to move the job into a background task.
Would that reliably prevent the missed execution issue in our case?

Ideally, we would prefer an option to ignore the high CPU / I/O load check so that scheduled jobs always run, even under heavy system load.

Metadata

Metadata

Assignees

No one assigned

    Labels

    reliabilityMissed, late or duplicated executions (long timers, sleep, clock drift)

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions