semaphoreui / semaphore

Modern UI for Ansible, Terraform, OpenTofu, Bash, Pulumi.
https://semaphoreui.com
MIT License
9.71k stars 1.01k forks source link

CRON Expression Format unclear #1143

Open EHEX-schildt opened 1 year ago

EHEX-schildt commented 1 year ago

The semapore Web Interface link to this go cron doku: https://pkg.go.dev/github.com/robfig/cron#hdr-CRON_Expression_Format This is a cron "table" using 6 space-separated fields.

If i try to set a Cron with 6 fields i get the message: Cron: expected exactly 5 fields, found 6: [* * * * * *] => so here is just die doku link misleading.

Travisnv commented 1 year ago

This misleading error text really bugs me. Given that scheduled trigger is a very basic stuff. Perhaps, we need to fix this.

NotGovernor commented 1 year ago

Which field needs to be dropped to make it accept it for now as a workaround? Seconds? It won't accept 0 0 7 * * * for daily at 7 am for example.

EHEX-schildt commented 1 year ago

Which field needs to be dropped to make it accept it for now as a workaround? Seconds? It won't accept 0 0 7 * * * for daily at 7 am for example.

it is a CRON with five fields. There are no seconds.

'0 7 *' should work for you.

NotGovernor commented 1 year ago

Thanks!

cmsj commented 2 weeks ago

The link being used is wrong, it's linking to the original version of robfig/cron. The correct link should be to v3:

https://pkg.go.dev/github.com/robfig/cron/v3#hdr-CRON_Expression_Format