File tree 2 files changed +5
-2
lines changed
2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ import (
31
31
32
32
func main () {
33
33
if err := cmd .RootCmd .Execute (); err != nil {
34
- if err = = cmd .ErrUsage {
34
+ if err ! = cmd .ErrUsage {
35
35
fmt .Fprintf (os .Stderr , "Error: %s\n " , err .Error ()) // #nosec
36
36
os .Exit (1 )
37
37
}
Original file line number Diff line number Diff line change 4
4
"context"
5
5
"fmt"
6
6
"net/url"
7
+ "strings"
7
8
"sync"
8
9
"time"
9
10
@@ -34,6 +35,7 @@ type updateCron struct {
34
35
// updates of all the instances existing.
35
36
func StartUpdateCron () (utils.Shutdowner , error ) {
36
37
autoUpdates := config .GetConfig ().AutoUpdates
38
+
37
39
if ! autoUpdates .Activated {
38
40
return utils .NopShutdown , nil
39
41
}
@@ -43,7 +45,8 @@ func StartUpdateCron() (utils.Shutdowner, error) {
43
45
finished : make (chan struct {}),
44
46
}
45
47
46
- schedule , err := cron .Parse (autoUpdates .Schedule )
48
+ spec := strings .TrimPrefix (autoUpdates .Schedule , "@cron " )
49
+ schedule , err := cron .Parse (spec )
47
50
if err != nil {
48
51
return nil , err
49
52
}
You can’t perform that action at this time.
0 commit comments