correction on the schedule

This commit is contained in:
2023-02-07 20:43:37 +01:00
parent 7bbdef88fa
commit 31f462721f
+4 -2
View File
@@ -133,15 +133,17 @@ async function startWithList(contacts, device, selectedStore, audioAnalyse, aler
}, Promise.resolve());
}
async function scheduleBookWithNumbers(startNumber, endNumber, selectedStore, pathToExcelFile = '/Users/lpan/Desktop/contact_all.xlsx', audioAnalyse = false, alertBeep = false) {
async function scheduleBookWithNumbers(startNumber, endNumber, selectedStore, pathToExcelFile = '/Users/lpan/Desktop/contact_all.xlsx', audioAnalyse = true, alertBeep = false) {
console.log("scheduleBookWithNumbers() called")
schedule.scheduleJob('30 10 * * *', function () {
console.log("start startBookWithNumbers")
startBookWithNumbers(startNumber, endNumber, selectedStore, pathToExcelFile, audioAnalyse = false, alertBeep = false)
startBookWithNumbers(startNumber, endNumber, selectedStore, pathToExcelFile, audioAnalyse, alertBeep)
})
}
async function startBookWithNumbers(startNumber, endNumber, selectedStore, pathToExcelFile = '/Users/lpan/Desktop/contact_all.xlsx', audioAnalyse = true, alertBeep = false) {
console.log("startBookWithNumbers() called, with alertBeep:" + alertBeep)
console.log("startBookWithNumbers() called, with audioAnalyse:" + audioAnalyse)
let allContactList = excelUtil.readContacts(pathToExcelFile);
let contactList;
if (endNumber <= allContactList.length) {