關於aws-Lambda的cron周期性定時任務的定義方式,與其他系統或者語言可能略有差異
區別之一,就是Lambda是6個字段的, (分,時,日,月,周,年),多了一個年份字段,各字段之間使用空格隔開
cron(Minutes Hours Day-of-month Month Day-of-week Year)
關於cron的一些示例(特別注意,cron定義的日期時間,都默認是指的UTC +0),如下:

對於星期幾,還可以使用1~7表示,不過1代表的是星期天,7代表的就是星期六,筆者工作中曾經配置過如下
# 即,UCT +8 我們本地時區,每周六的中午12點10分執行 cron(10 4 ? * 7 *)
還有兩點需要注意一下(Note the following):
(1) If you are using the Lambda console, do not include the cron prefix in your expression.
(2) One of the day-of-month or day-of-week values must be a question mark (?).
