I installed node-cron library and configured 2 crons in the same file to run at different intervals. The first cron runs every 45 seconds and the second cron runs every 60 seconds, it works perfectly. The problem happens when the 60-second cron is run, automatically the 45-second cron is also run again (notice that the difference is 15 seconds). Why does this happen?
const cron = require('node-cron');
cron.schedule('*/45 * * * * *', async () => {
console.log('running 45 seconds')
})
cron.schedule('*/60 * * * * *', async () => {
console.log('running 60 seconds')
})