public class CronExpressionQuantizer extends Object
Without this, people could supply cron expressions that run every five seconds or something equally inappropriate.
| Modifier and Type | Class and Description |
|---|---|
static class |
CronExpressionQuantizer.Randomize
Controls whether or not randomization is performed when a cron expression is quantized.
|
| Constructor and Description |
|---|
CronExpressionQuantizer() |
| Modifier and Type | Method and Description |
|---|---|
static String |
quantizeSecondsField(String cronExpression)
Quantize the seconds field using
CronExpressionQuantizer.Randomize.AS_NEEDED. |
static String |
quantizeSecondsField(String cronExpression,
CronExpressionQuantizer.Randomize randomize)
Quantize the seconds field, randomizing it as requested.
|
public static String quantizeSecondsField(String cronExpression)
CronExpressionQuantizer.Randomize.AS_NEEDED.cronExpression - the cron expression to (possibly) quantize.0 and
59 (inclusive) if it is not already in that formatpublic static String quantizeSecondsField(@Nullable String cronExpression, @Nullable CronExpressionQuantizer.Randomize randomize)
cronExpression - the cron expression to (possibly) quantize.randomize - controls the randomization of the seconds fields (null is assumed to mean
CronExpressionQuantizer.Randomize.AS_NEEDED.0 and
59 (inclusive) if it is not already in that format or as instructed to by
the randomize option.Copyright © 2017 Atlassian. All rights reserved.