cron 有 cron 语法的权威标准文档吗?

问题描述 投票:0回答:1

在搜索 Cron 用法示例和 Cron 语法解析工具时,我看到一些工具有 5 个输入位置,有些工具有 6 个(第六个是秒字段)。 此外,我看到一些风格支持

?
字符作为有效输入,而其他变体则不支持。

cron 有 cron 语法的权威标准文档吗? (例如 RFC 或 ISO 文档)。 或者 cron 只是类似工具的松散集合,每个工具都有自己的语法规则?

cron standards
1个回答
0
投票

我意识到这个问题已经有五年多了。我自己在寻找这样一个标准时偶然发现了它,并认为无论如何我都会报告我的发现。

我能找到的最接近 cron 表达式语法标准定义的是 crontab 实用程序的 IEEE Std 1003.1-2017(IEEE Std 1003.1-2008 的修订版)。具体来说,定义输入文件的部分:

INPUT FILES

    In the POSIX locale, the user or application shall ensure that a crontab entry is a text file consisting of lines of six fields each. The fields shall be separated by <blank> characters. The first five fields shall be integer patterns that specify the following:

        Minute [0,59]

        Hour [0,23]

        Day of the month [1,31]

        Month of the year [1,12]

        Day of the week ([0,6] with 0=Sunday)
© www.soinside.com 2019 - 2024. All rights reserved.