diff --git a/crontabd/build.sh b/crontabd/build.sh new file mode 100644 index 0000000..ae8ee7b --- /dev/null +++ b/crontabd/build.sh @@ -0,0 +1,3 @@ +nssm stop crontabd +go build . +nssm start crontabd \ No newline at end of file diff --git a/crontabd/crontabd.exe b/crontabd/crontabd.exe index a20816c..81c6018 100644 --- a/crontabd/crontabd.exe +++ b/crontabd/crontabd.exe @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:53910f79fea843bd19c45539c6f7fb4e4802ce0f12cbf7c034c49081e1fce642 +oid sha256:b3ec872b59df7471c3c1b4edac1318d9f995b691984481be1e602550f887b5b8 size 3501056 diff --git a/crontabd/main.go b/crontabd/main.go index 335462c..76c45e2 100644 --- a/crontabd/main.go +++ b/crontabd/main.go @@ -119,7 +119,7 @@ func loadCronJobs() error { func createJobFunc(job CronJob) func() { return func() { - cmd := exec.Command("sh", "-c", job.Command) + cmd := exec.Command(job.Command) output, err := cmd.CombinedOutput() if err != nil { logger.Error("Failed to execute command '%s': %v", job.Command, err)