Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- crono[m]=new Cron('00 * * * * *', //ogni minuto
- ()=>{
- //json è un array contenente i vari file json che prendo dal server, "m" sta ad indicare il nome del file (che altro non è che un numero)
- if(json[m].time['hour']==0 && json[m].time['minute']<=10)
- console.log("foo");
- if(json[m].time['hour']==0 && json[m].time['minute']==0) {
- console.log("time is up")
- crono[m]=null; // già provato con crono[m].stop, this.stop, addirittura this=null. Non va nessuna
- }
- json[m].time['minute']--;
- },null,true)
- //Ogni tanto mi scappa il ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement