{
  "id": 7124881,
  "title": "Migrating from crontab: five everyday schedules, translated into Kairos",
  "url": "https://urgent.news/2026/09/13/migrating-from-crontab-five-everyday-schedules-translated-into-kairos",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-09-13T15:57:25.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/azathothx/migrating-from-crontab-five-everyday-schedules-translated-into-kairos-16lf"
  },
  "original_language": "en",
  "account": "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.\n\nTo 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)`.\n\nTo 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.",
  "summary": "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…",
  "key_points": [
    "Translate crontab schedules to Kairos language for non-fixed-time repeats",
    "Define calendar system and time zone before creating Kairos schedules",
    "Run translated schedules with one crontab line checking for points daily"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}