{"size": 371, "ext": "js", "max_stars_repo_path": "10.crawl/4.cron.js", "max_stars_repo_name": "a-little-sheep/node---", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "10.crawl/4.cron.js", "max_issues_repo_name": "a-little-sheep/node---", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "10.crawl/4.cron.js", "max_forks_repo_name": "a-little-sheep/node---", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 16.8636363636, "max_line_length": 52, "alphanum_fraction": 0.5741239892}
//cronjob 计划任务
let CronJob = require('cron').CronJob;
//第一个参数是任务执行的时机
/**
 * * 秒(0-59)
 * * 分钟(0-59)
 * * 小时(0-23)
 * * 日期(1-31)
 * * 月(0-11)
 * * 星期(0-6)
 *
 * * 代表任意的值
 * 5 固定的值
 * 5,15,25,30 只要值在这个枚举范围之内的都可以
 * 10-30 代表一个区间或者范围
 * 取值等于0表示每隔多长时间一次
 *
 */
let job = new CronJob("00 00 22 * * 1,5",function(){
   console.log(new Date().toLocaleString());
});
job.start();