Urgent.News

What's breaking now, across thousands of outlets.

Tech

Migrating from crontab: five everyday schedules, translated into Kairos

If you arrived from the Kairos 1.0 announcement , this is the hands-on one: take a crontab you already have and translate it. First, the honest part: if your jobs are plain fixed-time repeats, stay on cron. "Every hour", "3am daily" — there is nothing to gain from rewriting them. You reach for a schedule language when you hit one of these: "end of month" won't fit; "business day" won't fit; the…

Migrating from cron schedules to Kairos involves translating existing crontab schedules into Kairos' schedule language. This process is beneficial when dealing with schedules that don't fit cron's fixed-time repeats, such as end-of-month, business day, or when a job started at the wrong hour due to a server move. The examples use 2026 US federal holidays as the premise, which remain constant throughout the migration.

To migrate, first define the calendar system and time zone, then create schedules using Kairos' language. For example, to run a job every weekday at 9am, use `bizDay | at(T09:00)`. For business days, exclude weekends and holidays using `bizDay = everyDay \ (satSun | holidays2026)`. Payroll runs on the 25th, or the previous business day if it falls on a weekend or holiday, can be achieved with `roll(Preceding, on: bizDay)`.

The last business day of the month can be found with `bizDay | within(month) | last`. Finally, to run three business days before month-end, use `monthEnd | roll(Preceding, on: bizDay) | shift(-3, unit: bizDay)`.

To run the translated schedules, keep one crontab line and use Kairos to determine if a point exists for the current day. For example, `0 9 * * * cd /srv/batch && ./run-if-today.sh payday.kairos ./payday.sh` checks if there's a point for the current day and runs the job if so. This allows cron to handle timekeeping while Kairos makes scheduling decisions.

Another approach is to schedule each point individually using Kairos' `next` command, which returns the next point in wall-clock text and epoch milliseconds. This can be used with OS timers to run jobs at specific times.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

I Built a Python CLI Toolbox Instead of Writing One-Off Scripts

Whenever I ask an AI assistant to do a small task, it writes a quick Python script for me. Convert an image. Compress a PDF. Convert a CSV to Excel.

  • Developer created Python CLI toolbox named Toolbox
  • Toolbox includes utilities for CSV to Excel conversion, image manipulation, PDF compression
  • Developer used Python's package manager uv for dependency management

My parser reported a parse error on a file that was never malformed

A build step that reads requirement tables out of a document reported this, every run: FAIL_MAP reason=parse reason=parse has an obvious reading.

  • Parser misidentified 256 well-formed rows as paragraphs
  • Reason code should indicate zero structured forms, not file malformation
  • Derived artifacts must be regenerated from committed state

How I Turned the SAM.gov Public Bulk Dataset Into a Searchable Contractor Database

Working with public government datasets often sounds straightforward until you actually try to turn them into something useful. That was my experience with the SAM.gov public bulk dataset .

  • Author created SAM.gov Public Contractor & NAICS Database Compiler tool
  • Tool processes raw SAM.gov dataset locally, bypassing API limits
  • Supports multiple filters and two output modes for contractor data

More from Sunday 13 September →