EDIT: - this has been resolved in "node-cron" version > "3.0"
I have the following code. "node-cron": "^2.0.3"
cron.schedule('46 00 * * *',() => {
//code to be executed
console.log("Tik")
},{
scheduled: true,
timezone: "America/New_York"
});
As per my understanding, this should fire at 12:46 am America/New_York time irrespective of my machine timezone. But it doesn't work till I match the timezone with hosting machine time e.g if my machine time zone is Europe/London and I use timezone: "Europe/London"
the cron will work at the exact time.
I want to schedule cron for the specific timezone. Since I am dealing with few timezones so running cron every half hour and doing checks dosent look effecient.