i am using node-cron. what i want is when my program start node-cron should run the function and then wait for 60 mints and run the function but in real when i start the execution node-cron did'not run the function on start but after 59 mints . any help will be appreciated. thanks in advance
here is my code.
export const surrogate = async () => {
cron.schedule("*/59 * * * *", scheduleFunction);
};
const scheduleFunction = async () => {
console.log("Calling after 59 minutes");
};
Since you must call
surrogate
only once at start-up: