CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/npm-cronstrue

tessl install tessl/npm-cronstrue@3.2.0

Convert 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%

task.mdevals/scenario-3/

Cron Schedule Translator

A utility that translates cron expressions into human-readable descriptions, with special support for JavaScript Date-style month indexing.

Background

Many scheduling systems export cron expressions where months are represented using JavaScript Date-style indexing (0=January, 11=December) rather than the standard cron convention (1=January, 12=December). Your task is to build a utility that can correctly interpret and describe such cron expressions.

Requirements

Create a module that exports a describeCronSchedule function that converts cron expressions with zero-indexed months into human-readable English descriptions.

Function Specification

The function should accept a cron expression string and return a human-readable description. The function must handle cron expressions where:

  • Months use zero-based indexing (0=January, 1=February, ..., 11=December)
  • The description should be in English
  • The description should be clear and readable

Test Cases

  • Given the cron expression "0 9 * 0 *", the description should indicate it runs at 9:00 AM in January @test
  • Given the cron expression "0 14 * 5-7 *", the description should indicate it runs at 2:00 PM from June through August @test
  • Given the cron expression "*/15 * * 11 *", the description should indicate it runs every 15 minutes in December @test

Implementation

@generates

API

/**
 * Converts a cron expression with zero-indexed months into a human-readable description
 * @param {string} cronExpression - The cron expression to describe (with 0-indexed months)
 * @returns {string} Human-readable description of the schedule
 */
function describeCronSchedule(cronExpression) {
  // Implementation here
}

module.exports = { describeCronSchedule };

Dependencies { .dependencies }

cronstrue { .dependency }

Provides cron expression to human-readable text conversion.

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
npmpkg:npm/cronstrue@3.2.x
tile.json