📣 极限科技诚招搜索运维工程师(Elasticsearch/Easysearch)- 全职/北京 👉 : 立即申请加入

版本: 6.8-8.9

简而言之,当 Elasticsearch 无法解析 Cron 计划任务时会出现此错误,因为它无法在 Cron 数组中找到有效的 Cron 表达式。这通常发生在 Cron 表达式缺失或格式不正确的情况下。要解决此问题,您可以:1)确保在 Cron 数组中提供了有效的 Cron 表达式;2)检查 Cron 表达式的语法,确保其格式正确;3)如果 Cron 数组为空,向其添加一个有效的 Cron 表达式。

日志上下文 #

日志 “could not parse [cron] schedule. no cron expression found in cron array” 的类名是 CronSchedule.java。我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入了解上下文的人参考:

"could not parse [cron] schedule. expected a string value in the cron " + "array but found [" + token + "]"
 );
 }
 }
 if (crons.isEmpty()) {
     throw new ElasticsearchParseException("could not parse [cron] schedule. no cron expression found in cron array");
 }
 try {
     return new CronSchedule(crons.toArray(String[]::new));
 } catch (IllegalArgumentException iae) {
     throw new ElasticsearchParseException("could not parse [cron] schedule", iae);
```,oldString: