Cron jobs for Node.js applications that enables developers to execute functions or system commands on schedules defined using standard cron syntax
94
Build a task scheduler that executes scheduled tasks and tracks execution metrics using multiple callbacks.
Create a scheduler system that:
Your implementation should:
@generates
/**
* Creates and configures a task scheduler with metrics tracking
* @param {Object} config - Configuration object
* @param {Function} config.taskCallback - Main task to execute on schedule
* @param {Function} config.metricsCallback - Callback to track execution metrics
* @param {Function} config.onComplete - Callback executed when scheduler stops
* @returns {Object} Scheduler instance with start() and stop() methods
*/
function createScheduler(config) {
// IMPLEMENTATION HERE
}
module.exports = { createScheduler };Provides job scheduling capabilities for executing callbacks on a time-based schedule.
Install with Tessl CLI
npx tessl i tessl/npm-cronevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10