This repository was archived by the owner on Oct 27, 2025. It is now read-only.

Description
Description
When I use pulse.every, setting endDate has no effect. I set both startDate and endDate, but only startDate has an effect, and the task will continue to execute after the set endDate time has passed.
Code example
import Pulse from "@pulsecron/pulse";
const mongoConnectionString = '****';
const pulse = new Pulse({ db: { address: mongoConnectionString } });
pulse.define(
"raintrip",
async (job) => {
console.log("raintrip job running");
return;
},
{
shouldSaveResult: true,
attempts: 4,
backoff: { type: "exponential", delay: 1000 },
}
);
(async function () {
// IIFE to give access to async/await
await pulse.start();
// Alternatively, you could also do:
await pulse.every("* * * * *", "raintrip", {
timezone: "Asia/Shanghai",
startDate: new Date("2024-11-26T20:20:00"),
endDate: new Date("2024-11-26T20:25:00"),
});
Additional context
"@pulsecron/pulse": "^1.6.7"