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 utility that converts standard cron expressions into human-readable descriptions. The utility should support 5-part cron expressions following the standard format: minute, hour, day-of-month, month, and day-of-week.
Your solution must:
minute hour day-of-month month day-of-weekInput: "*/5 * * * *"
Output: Should describe running every 5 minutes
Input: "30 14 * * *"
Output: Should describe running at 2:30 PM every day
Input: "0 9 * * MON-FRI"
Output: Should describe running at 9:00 AM on Monday through Friday
Input: "0 6,12,18 * * *"
Output: Should describe running at 6:00 AM, 12:00 PM, and 6:00 PM
// src/cronParser.test.js
describe('Cron Parser', () => {
it('should parse every minute expression', () => {
const result = parseCronExpression('* * * * *');
expect(result).toContain('minute');
});
});// src/cronParser.test.js
describe('Cron Parser', () => {
it('should parse specific time expression', () => {
const result = parseCronExpression('30 11 * * *');
expect(result).toContain('11:30');
});
});// src/cronParser.test.js
describe('Cron Parser', () => {
it('should parse weekday range expression', () => {
const result = parseCronExpression('0 23 * * MON-FRI');
expect(result).toContain('Monday');
expect(result).toContain('Friday');
});
});// src/cronParser.test.js
describe('Cron Parser', () => {
it('should parse step value expression', () => {
const result = parseCronExpression('*/15 * * * *');
expect(result).toContain('15');
});
});A library that provides cron expression parsing and conversion capabilities.