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 system that validates and describes cron expressions with specific focus on range-based schedules.
Implement a module that provides the following functionality:
Create a function that validates whether a cron expression uses range syntax correctly:
true if the expression is valid and uses at least one range (hyphen-separated values)false if the expression is invalid or contains no ranges1-5, MON-FRI, JAN-MARCreate a function that converts cron expressions containing ranges into human-readable descriptions:
1-5) and named ranges (e.g., MON-FRI, JAN-MAR)"0 9-17 * * *", it returns a description indicating execution every hour between 9 AM and 5 PM @test"30 11 * * MON-FRI", it returns a description indicating execution at 11:30 AM Monday through Friday @test"0 0 1 JAN-MAR *", it returns a description indicating execution at midnight on the 1st of the month, January through March @test"0-10 9 * * *", it validates as true since it contains a range and returns a description for minutes 0-10 at 9 AM @test@generates
/**
* Validates if a cron expression uses range syntax correctly
* @param {string} expression - A 5-part cron expression
* @returns {boolean} True if valid and contains at least one range, false otherwise
*/
function hasRanges(expression) {
// IMPLEMENTATION HERE
}
/**
* Converts a cron expression with ranges to human-readable description
* @param {string} expression - A cron expression containing range syntax
* @returns {string} Human-readable description of the schedule
*/
function describeSchedule(expression) {
// IMPLEMENTATION HERE
}
module.exports = {
hasRanges,
describeSchedule
};Provides cron expression parsing and human-readable conversion functionality.
@satisfied-by