Created an API to run some scheduled jobs with Nodejs which is running in a docker container.
exports.createAutoJobs = async (req, res, next) => {
console.log("Request received")
cron.schedule('* * * * *', () => {
console.log('Running');
});
}
The above code is printing "Running" for every minute But for the same code adding a custom time pattern is not working
exports.createAutoJobs = async (req, res, next) => {
console.log("Request received")
cron.schedule('00 13 15 * *', () => {
console.log('Running');
});
}
The custom pattern is working if it is outside the container as a normal Nodejs application, but not inside the docker container. What is the way to get around it and run the cron jobs inside a docker container. Is there an alternative to this approach?