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 how well the engineer uses the cron package's timezone and UTC offset features to build a multi-timezone job scheduler. The focus is on proper usage of CronJob class with timeZone and utcOffset parameters, and querying execution times.",
"type": "weighted_checklist",
"checklist": [
{
"name": "CronJob with timeZone",
"description": "Uses CronJob constructor or CronJob.from() with the timeZone parameter to create timezone-aware scheduled jobs. The timeZone parameter should be passed with IANA timezone names (e.g., 'America/New_York', 'Europe/Paris').",
"max_score": 30
},
{
"name": "CronJob with utcOffset",
"description": "Uses CronJob constructor or CronJob.from() with the utcOffset parameter to create jobs scheduled using UTC offset in minutes. The utcOffset parameter should be used as an alternative to timeZone for regions without named timezones.",
"max_score": 25
},
{
"name": "nextDate() method",
"description": "Uses the nextDate() method on CronJob instances to query when the job will execute next. This method should be called to retrieve the next scheduled execution time for a configured job.",
"max_score": 20
},
{
"name": "Timezone validation",
"description": "Properly handles invalid timezone names by catching or allowing errors to propagate when an invalid timezone is provided to CronJob. The implementation should demonstrate awareness that invalid timezones cause errors.",
"max_score": 15
},
{
"name": "Cron expression usage",
"description": "Correctly passes cron expressions as the cronTime parameter to CronJob constructor or CronJob.from(). The expressions should follow standard cron syntax for scheduling.",
"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