kontena / pharos-host-upgrades

Kube DaemonSet for host OS upgrades
Apache License 2.0
41 stars 1 forks source link

Use standard cron syntax for --schedule #30

Closed SpComb closed 6 years ago

SpComb commented 6 years ago

Fixes #29

The --schedule option now accepts standard five-field crontab syntax, forcing seconds to 0.

The previous six-field syntax with leading seconds will now be rejected.

SpComb commented 6 years ago

Fails with the old syntax:

2018/06/19 13:26:06 Invalid --schedule=0 * * * * *: Expected exactly 5 fields, found 6: 0 * * * * *

Works with the standard syntax:

2018/06/19 16:21:42 Using --schedule="30 6 * * *", first upgrade at: 2018-06-20 06:30:00 +0300 EEST (in 14h8m17.998512199s)