public class

CronValidator

extends Object
java.lang.Object
   ↳ com.atlassian.jira.scheduler.cron.CronValidator

Class Overview

This is similar to the com.atlassian.scheduler.cron.CronExpressionValidator, except that the error messages go through translation.

Summary

Public Constructors
CronValidator(I18nHelper i18nHelper, SchedulerService schedulerService)
Public Methods
Option<String> validateCron(String expr)
Validates a cron expression using JIRA's default time zone
Option<String> validateCron(String expr, TimeZone timeZone)
Validates a cron expression using the specified time zone.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public CronValidator (I18nHelper i18nHelper, SchedulerService schedulerService)

Public Methods

public Option<String> validateCron (String expr)

Validates a cron expression using JIRA's default time zone

Parameters
expr the Cron Expression to validate and turn into trigger
Returns
  • Option containing error description if error occurred or none if cron expression is valid.

public Option<String> validateCron (String expr, TimeZone timeZone)

Validates a cron expression using the specified time zone.

Parameters
expr the Cron Expression to validate and turn into trigger
timeZone the time zone to use when checking that the cron expression will result in a job that runs; may be null to indicate that JIRA's default time zone should be used
Returns
  • Option containing error description if error occurred or none if cron expression is valid.