/**
 * @name: test
 * @author: alan
 * @date: 2022-09-15 18:51
 * @description：test
 * @update: 2022-09-15 18:51
 */
const schedule = require("node-schedule");
const {v4: uuidv4} = require("uuid");
var rule = new schedule.RecurrenceRule();
let secondList = [];
for(let i = 0; i < 60; i++) {
  secondList.push(i);
}
rule.second = secondList;
let count = 0;
const uuid = uuidv4();

schedule.scheduleJob(uuid, rule, () => {
  console.log(count);
  count += 1;
  if(count >= 10) {
    schedule.cancelJob(uuid);
  }
});

