Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const task = schedule.scheduleJob(rule, function () {
i++
console.log('i---', i)
percollate.configure();
percollate.pdf(arr[i - 1], {
output: (i - 1) + name,
css,
usePup
});
if (i === arr.length) {
i = 0
// 获得未生成pdf文件的index值
unsavedFiles = utils.getUnsavedIndex(arr.length)
return
}
// 第一次生成失败的再次生成
if (unsavedFiles.length) {
percollate.configure();
percollate.pdf(arr[unsavedFiles[i - 1]], {
output: (unsavedFiles[i - 1]) + name,