Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Commit

Permalink
Merge pull request #4 from WadeBarnes/feature/upgrade-go
Browse files Browse the repository at this point in the history
Use latest version of Go for the builds
  • Loading branch information
WadeBarnes authored Feb 10, 2020
2 parents 4dd77e1 + b467096 commit 4532f6c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
const (
Name = "go-crond"
Author = "webdevops.io"
Version = "0.6.2"
Version = "0.6.3"
LogPrefix = "go-crond: "
)

Expand Down
8 changes: 4 additions & 4 deletions runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ func NewRunner() *Runner {
func (r *Runner) Add(cronjob CrontabEntry) error {
cronSpec := cronjob.Spec
if !strings.HasPrefix(cronjob.Spec, "@") {
cronSpec = fmt.Sprintf("0 %s", cronjob.Spec)
cronSpec = fmt.Sprintf("%s", cronjob.Spec)
}

err := r.cron.AddFunc(cronSpec, r.cmdFunc(cronjob, func(execCmd *exec.Cmd) bool {
_, err := r.cron.AddFunc(cronSpec, r.cmdFunc(cronjob, func(execCmd *exec.Cmd) bool {
// before exec callback
LoggerInfo.CronjobExec(cronjob)
return true
Expand All @@ -50,10 +50,10 @@ func (r *Runner) AddWithUser(cronjob CrontabEntry) error {

cronSpec := cronjob.Spec
if !strings.HasPrefix(cronjob.Spec, "@") {
cronSpec = fmt.Sprintf("0 %s", cronjob.Spec)
cronSpec = fmt.Sprintf("%s", cronjob.Spec)
}

err := r.cron.AddFunc(cronSpec, r.cmdFunc(cronjob, func(execCmd *exec.Cmd) bool {
_, err := r.cron.AddFunc(cronSpec, r.cmdFunc(cronjob, func(execCmd *exec.Cmd) bool {
// before exec callback
LoggerInfo.CronjobExec(cronjob)

Expand Down

0 comments on commit 4532f6c

Please sign in to comment.