Ditch "sh -c" since we have no sh
This commit is contained in:
3
crontabd/build.sh
Normal file
3
crontabd/build.sh
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
nssm stop crontabd
|
||||||
|
go build .
|
||||||
|
nssm start crontabd
|
BIN
crontabd/crontabd.exe
(Stored with Git LFS)
BIN
crontabd/crontabd.exe
(Stored with Git LFS)
Binary file not shown.
@@ -119,7 +119,7 @@ func loadCronJobs() error {
|
|||||||
|
|
||||||
func createJobFunc(job CronJob) func() {
|
func createJobFunc(job CronJob) func() {
|
||||||
return func() {
|
return func() {
|
||||||
cmd := exec.Command("sh", "-c", job.Command)
|
cmd := exec.Command(job.Command)
|
||||||
output, err := cmd.CombinedOutput()
|
output, err := cmd.CombinedOutput()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.Error("Failed to execute command '%s': %v", job.Command, err)
|
logger.Error("Failed to execute command '%s': %v", job.Command, err)
|
||||||
|
Reference in New Issue
Block a user