tessl install tessl/npm-cronstrue@3.2.0Convert cron expressions into human readable descriptions
Agent Success
Agent success rate when using this tile
100%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.12x
Baseline
Agent success rate without this tile
89%
Build a cron expression validator that checks if user-submitted cron expressions are valid and provides helpful error feedback when they contain out-of-range values.
Your validator should:
isValid: boolean indicating if the expression is validerrorMessage: string describing what's wrong (only if invalid)description: human-readable description of the schedule (only if valid)"* * * * *" returns isValid: true with a description of the schedule @test"65 * * * *" returns isValid: false with an error message indicating the minute field is out of range @test"0 25 * * *" returns isValid: false with an error message indicating the hour field is out of range @test"0 0 32 * *" returns isValid: false with an error message indicating the day-of-month field is out of range @test"30 14 1 * *" returns isValid: true with a description of the schedule @test@generates
/**
* Validates a cron expression and provides feedback
* @param {string} expression - The cron expression to validate
* @returns {{isValid: boolean, errorMessage?: string, description?: string}} Validation result
*/
function validateCronExpression(expression) {
// IMPLEMENTATION HERE
}
module.exports = { validateCronExpression };Provides cron expression parsing and validation support.