Cron jobs for Node.js applications that enables developers to execute functions or system commands on schedules defined using standard cron syntax
94
{
"context": "This criteria evaluates the engineer's ability to use the cron package for basic job scheduling, focusing on proper instantiation of scheduled jobs, control of job execution, and understanding of cron expression syntax.",
"type": "weighted_checklist",
"checklist": [
{
"name": "CronJob instantiation",
"description": "Uses the CronJob class constructor or CronJob.from() factory method to create scheduled job instances (one per reminder function).",
"max_score": 25
},
{
"name": "onTick callback",
"description": "Correctly passes a callback function to the onTick parameter that executes when the scheduled time arrives, implementing the required logging functionality.",
"max_score": 20
},
{
"name": "cronTime parameter",
"description": "Properly configures the cronTime parameter with cron expression strings, including correct 6-field format for seconds-based scheduling (e.g., '*/2 * * * * *') and 5-field format for minute-based scheduling (e.g., '30 14 * * *').",
"max_score": 20
},
{
"name": "start parameter usage",
"description": "Correctly uses the start constructor parameter to control automatic job execution, setting it based on the autoStart argument in createReminder and defaulting to true for createDailyReminder.",
"max_score": 15
},
{
"name": "start() method",
"description": "Exposes and correctly uses the start() method from the CronJob instance to begin job execution when needed.",
"max_score": 10
},
{
"name": "stop() method",
"description": "Exposes and correctly uses the stop() method from the CronJob instance to halt job execution when needed.",
"max_score": 10
}
]
}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