4

Crontention | About

 4 years ago
source link: https://crontention.herokuapp.com/about.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

What is Crontention?

Crontention visualizes potential contention caused by the Quartz Job Scheduler's cron trigger expressions. The name is a portmanteu of cron and contention.

Crontention evaluates Quartz cron expressions for a single UTC day and draws a heat map of overlapping fire-times. The darker the color, the greater the risk of contention. Use that information to spread out events to utilize resources more evenly or arrange dependencies. See an example.

Crontention is open source, released under the Apache-2.0 license. If you think something could be improved, tell me about it.

Usage

  1. Enter your Quartz cron expressions in the large text area.
  2. Optionally, choose a specific ISO 8601 date to evaluate the expressions for.
  3. Click Evaluate.
  4. Inspect the heat map.
  5. Optionally, save or share the URL.

Features and limitations

  • Evaluations can be hot-linked.
  • The heat map's color scale has high contrast.
  • Crontention uses a real Quartz scheduler to evaluate fire-times. This means expression evaluations are authentic but also that Crontention relies on a server-side component.
  • https://crontention.herokuapp.com runs on a Heroku Free dyno so it is likely you have to wait for it to wake up every time you visit.
  • All times are in UTC.
  • Only a single day of events will be calculated—by default, the current date.
  • The heat map's granularity is constrained to minutes and therefore overestimates the footprint of sub-minute duration jobs.
  • The heat map does not consider job duration and therefore underestimates the footprint of long-running jobs.
  • The heat map's colors are relative, not absolute: a dark red color can mean anything from 6 simultaneous events to 600 simultaneous events, depending on context.

Extended Quartz cron expression support

Crontention extends the basic Quartz cron expression syntax with an optional command field comparable to the one in crontab cron expressions: everything to the right of the optional year field is considered a command. This field does nothing and is only useful for distinguishing the otherwise opaque cron expressions.

Standard support

Crontention does not support standard crontab (UNIX) cron expressions, however, they can be manually translated into nearly or fully equivalent Quartz cron expressions in this way:

  1. If it is a macro, translate it into standard form.
  2. Prepend a 0 for the missing second field.
  3. Replace either the day-of-month or day-of-week field with ?, but not both.
  4. Remove the command field.

See also

  • Cron Heatmap draws heat maps of standard cron expressions. It does not support Quartz cron expressions or hot-linking, and the heat map's color scale has poor contrast. It is the main motivation and source of inspiration for Crontention.
  • FreeFormatter.com's Free Online Cron Expression Generator and Describer, whose name rolls right off the tongue, evaluates a small amount of future fire-times for a single Quartz cron expression. It does not support contention indication in any way.
  • Quartz Scheduler's Cron Trigger Tutorial is a decent introduction to understanding and using Quartz's cron implementation.
  • Quartz Scheduler's CronExpression API documentation is the best documentation of Quartz's cron expression syntax.

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK