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 evaluation assesses the engineer's ability to use the cron package's immediate execution on initialization feature (runOnInit parameter) combined with basic job scheduling to build a synchronization system that executes tasks both immediately at startup and on a regular schedule.",
"type": "weighted_checklist",
"checklist": [
{
"name": "CronJob instantiation",
"description": "Uses the CronJob class (or CronJob.from() factory method) from the cron package to create a scheduled job",
"max_score": 15
},
{
"name": "runOnInit parameter",
"description": "Correctly uses the runOnInit constructor parameter set to true to trigger immediate execution upon job initialization",
"max_score": 40
},
{
"name": "Cron expression",
"description": "Provides a valid cron expression (e.g., '*/30 * * * * *' for every 30 seconds) as the cronTime parameter to schedule recurring executions",
"max_score": 15
},
{
"name": "onTick callback",
"description": "Implements the onTick callback parameter that performs the synchronization operation (writing to sync-log.txt)",
"max_score": 15
},
{
"name": "Job control",
"description": "Uses the start() method to begin job execution and provides the stop() method for graceful shutdown",
"max_score": 15
}
]
}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