Advertisement
Guest User

Untitled

a guest
Dec 15th, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. crono[m]=new Cron('00 * * * * *',                       //ogni minuto
  2.     ()=>{
  3.     //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)
  4.     if(json[m].time['hour']==0 && json[m].time['minute']<=10)
  5.         console.log("foo");
  6.     if(json[m].time['hour']==0 && json[m].time['minute']==0) {
  7.         console.log("time is up")
  8.         crono[m]=null; // già provato con crono[m].stop, this.stop, addirittura this=null. Non va nessuna
  9.  }
  10. json[m].time['minute']--;
  11. },null,true)
  12.  
  13. //Ogni tanto mi scappa il ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement