module

Autobot::Cron::Formatter

Shared formatting helpers for cron schedules and relative times. Used by CronTool, TelegramChannel, and CronCmd.

Constants

HOURS_PER_DAY = 24
HTML_TIME_FORMAT = "%b %-d, %H:%M UTC"
MINUTES_PER_HOUR = 60
MS_PER_SECOND = 1000
SECONDS_PER_MINUTE = 60
TIME_FORMAT = "%Y-%m-%d %H:%M UTC"

Class methods

escape_html(s : String) : String
Source
format_duration(ms : Int64) : String
Source
format_exec_output(job : CronJob, output : String) : String

Markdown-formatted exec job output notification.

Source
format_job_detail(job : CronJob) : String

Job detail (command or message) based on job type.

Source
format_job_line_html(job : CronJob, index : Int32) : String

HTML-formatted job line for Telegram cron list.

Source
format_last_run_html(last_run_at_ms : Int64 | Nil) : String

HTML-safe last-run string with emoji status indicator.

Source
format_relative_time(time_ms : Int64 | Nil) : String
Source
format_schedule(schedule : CronSchedule) : String
Source
format_schedule_html(schedule : CronSchedule) : String

HTML-safe schedule string with emoji prefix, suitable for Telegram and similar channels.

Source
format_type_tag(job : CronJob) : String

Plain-text type tag for LLM tool output.

Source