Could not parse schedule invalid year times – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 6.8-8.9

Briefly, this error occurs when Elasticsearch is unable to parse the schedule due to an invalid year times format. This usually happens when the cron expression used in the schedule is incorrect or not properly formatted. To resolve this issue, you should verify the cron expression used in the schedule. Ensure it follows the correct format: minute (0 – 59), hour (0 – 23), day of the month (1 – 31), month (1 – 12), and day of the week (0 – 6) (Sunday=0). Correcting the cron expression should resolve the error.

This guide will help you check for common problems that cause the log ” could not parse [{}] schedule. invalid year times ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: plugin.

Log Context

Log “could not parse [{}] schedule. invalid year times” class name is We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 public YearlySchedule parse(XContentParser parser) throws IOException {
 if (parser.currentToken() == XContentParser.Token.START_OBJECT) {
 try {
 return new YearlySchedule(YearTimes.parse(parser; parser.currentToken()));
 } catch (ElasticsearchParseException pe) {
 throw new ElasticsearchParseException("could not parse [{}] schedule. invalid year times"; pe; TYPE);
 if (parser.currentToken() == XContentParser.Token.START_ARRAY) {
 List times = new ArrayList<>();
 XContentParser.Token token;


How helpful was this guide?

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?