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-8/

Meeting Scheduler

Build a meeting scheduler that converts recurring meeting schedules into human-readable descriptions.

Requirements

Your task is to create a utility that takes cron-style scheduling expressions and returns user-friendly descriptions. The system must support schedules that specify the Nth occurrence of a weekday within a month (e.g., "third Monday", "second Sunday").

Core Functionality

Implement a function that:

  1. Accepts a scheduling expression string as input
  2. Parses the expression to understand the schedule
  3. Returns a human-readable description of when the meeting occurs

Scheduling Format

The scheduling expressions follow a cron-like format with these fields:

  • Minute (0-59)
  • Hour (0-23)
  • Day of month (1-31 or special syntax)
  • Month (1-12)
  • Day of week (0-6, where 0=Sunday)

The system must handle the special "Nth occurrence" syntax for day of week:

  • Format: DAY#N where DAY is 0-6 and N is 1-5
  • Example: 1#3 means "third Monday of the month"
  • Example: 0#2 means "second Sunday of the month"

Test Cases { .test }

Create a test file scheduler.test.js with the following test cases:

  1. Third Monday meeting @test

    • Input: "30 14 * * 1#3"
    • Should describe a meeting at 2:30 PM on the third Monday of each month
  2. Second Sunday meeting @test

    • Input: "0 10 * * 0#2"
    • Should describe a meeting at 10:00 AM on the second Sunday of each month
  3. First Friday meeting @test

    • Input: "0 9 * * 5#1"
    • Should describe a meeting at 9:00 AM on the first Friday of each month

@generates

API

/**
 * Converts a scheduling expression into a human-readable description
 * @param {string} expression - The cron-style scheduling expression
 * @returns {string} A human-readable description of the schedule
 */
function describeSchedule(expression) {
  // Implementation here
}

module.exports = { describeSchedule };

Dependencies { .dependencies }

cronstrue { .dependency }

Provides cron expression parsing and human-readable conversion support.

Version

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