sharing programmer-to-programmer. please enjoy. pages are formatted for landscape tablet, laptop, or monitor.

khronos, scheduling daemon

greek, khronos-anileis (merciless time)

daily use in production

khronos is a time-based job scheduler as opposed to event-driven, condition-driven, or user-requested. while cron is about execution, khronos focuses on adding monitoring/intervention, tracking/records-keeping, and feedback/reporting. the goal is a complete feedback loop.

i absolutely need a step change in system usage. machines typically are idle over 50% and often use only 10-15% of total daily capacity. the problem is not capacity, the issue is developing a mindset to get every drop of value out of the system. i am weak, but i want to do better.

begin with the end in mind

khronos is a time-based job scheduler. so, one goal is an understandable execution schedule for your machine. this report is an excerpt of the 24h by minute report which shows the graveyard schedule (2a - 5a). data is real-ish.

i added trackers, which are just short english phrases to use as titles, quick lookups, and consistent tracking database targets. changing files and moving lines does not effect the results kept as they all tie to the trackers.

using reports like this, i can more easily see how jobs nest together and potentially compete. i also use this report to show actuals against the estimates. with enough feedback, i can tune both the programs and the schedule.

this report has eight 3-hour sections, from dusk till dawn, above being graveyard and the others are above and below in the source report. other reporting will show different details and timeframes. but, this is one of my favorites.

and then, design data to get there

khronos files are just modified versions of typical crontabs. everything i added is optional. an original crontab file will actually run. but, then we’re back to execution-only focus which does not serve my purposes.

below, all lines are expanded to the full version. you can see the trackers just to the left of center, schedules to left, and durations just to right. that’s everything that was needed to create the report above. all new fields can be defaulted by leaving blank.

here are the more important additions that help my goals

  • at the top, .valid, .only, .blackout, and .retire, control when this file is valid

  • at bottom, .graceful and .violent control final cleanup, where needed

  • schedules now include weeks and years (optional)

  • trackers (already mentioned) are for reference and logging (optional)

  • durations are estimates in seconds, minutes, or hours (optional)

  • controls configure individual job monitoring and intervention (optional)

khronos will accept a standard crontab line, especially for simple jobs. but, i am targeting tons of efficient automation, not trying to make nuisance jobs easier to schedule ;)

most of this stuff is self-explanatory enough, below will give a little more on monitoring/intervention and tracking/records-keeping.

source code is GPL3 licensed, https://github.com/heatherlyrobert/khronos

Previous
Previous

scheduling grammar with ysched

Next
Next

eterm management with theia-euryphaessa