How to use the rescheduleJob function from node-schedule
Find comprehensive JavaScript node-schedule.rescheduleJob code examples handpicked from public code repositorys.
GitHub: DTStack/doraemon
20 21 22 23 24 25 26 27 28 29 30 31
} // 改变文章订阅任务的时间规则 const changeTimedTask = (name, cron, agent) => { if (!timedTaskIsExist(name, agent)) return createTimedTask(name, cron, agent) schedule.rescheduleJob(schedule.scheduledJobs[`${ name }`], cron) log(agent, `编辑文章订阅任务, id: ${ name }, Cron: ${ cron }`) } // 取消指定文章订阅任务
5
25
0
37 38 39 40 41 42 43 44 45 46
tomorrow.setUTCMinutes(tomorrow.getUTCMinutes() + 3); tomorrow.setDate(tomorrow.getDate() + 1); console.log(tomorrow) schedule.rescheduleJob(this.scheduleJob, { start: tomorrow, rule: scheduleConfig.getRule() }); console.log(`Rescheduled puzzle system. Next occurance: ${this.scheduleJob.nextInvocation()})`) }); console.log(`Started puzzle schedule. Next occurance: ${this.scheduleJob.nextInvocation()}`) }
4
6
0
+ 2 other calls in file
GitHub: Thomah/boothby
4 5 6 7 8 9 10 11 12 13 14 15
exports.schedule = function (config, callback) { jobs[config.name] = schedule.scheduleJob(config.cron, callback); }; exports.reschedule = function (config) { jobs[config.name] = schedule.rescheduleJob(jobs[config.name], config.cron); }; exports.nextInvocation = function (config) { if(jobs[config.name] !== undefined && jobs[config.name] !== null) {
2
0
0
+ 3 other calls in file
23 24 25 26 27 28 29 30 31 32 33
exports.reschedulingJob = async (jobId, userData) => { try { var date = new Date(userData.date); logger.debug("RescheduleJob for JOB ID ..." + jobId); await schedule.rescheduleJob(jobId, date); return true; } catch (err) { logger.error("Error during rescheduling ", err); throw createError(500,"Internal Server Error")
1
1
0
15 16 17 18 19 20 21 22 23 24 25
users[message.user] = null; user = null; } if (!user) user = await registerNewUser(message, client, say); startMachine(user, say, { type: "message", content: message }); // schedule.rescheduleJob("reminder_" + user.user, buildRecurrenceRule(user.reminder.rule)) } exports.handleActionResponse = async (type, body, ack, say, client) => { let user = users[body.user.id];
0
0
0
+ 2 other calls in file
node-schedule.scheduledJobs is the most popular function in node-schedule (381 examples)