const schedule = require('node-schedule');
const moment=require('moment');
let saat=moment().utc(true);


function addJob(id,tarih) {
    console.log(`adding job ${tarih.toJSON()}`)
    var arr=tarih.toObject()
    schedule.scheduleJob('job' + id,{hour:arr.hours,minute:arr.minutes,second:arr.seconds}, (y) => {
        console.log(`running job ${y}`)
    })
}


for(let i = 0; i < 5000; i++) {
    addJob(1,saat.add(5, 'seconds'))
    addJob(2,saat.add(5, 'seconds'))
    addJob(3,saat.add(5, 'seconds'))
}
// addJob(1,saat.add(5, 'seconds'))
// addJob(2,saat.add(5, 'seconds'))
// addJob(3,saat.add(5, 'seconds'))


setInterval(()=>{},500);