diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..cd784ab --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +cronmanager +.idea \ No newline at end of file diff --git a/main.go b/main.go index 33bc43c..604d9aa 100644 --- a/main.go +++ b/main.go @@ -19,7 +19,7 @@ import ( "github.com/juju/fslock" ) -//isDelayed: Used to signal that the cron job delay was triggered +// isDelayed: Used to signal that the cron job delay was triggered var ( isDelayed = false jobStartTime time.Time @@ -90,7 +90,7 @@ func main() { // If we have a log file specified, use it if *logfilePtr != "" { - outfile, err := os.Create(*logfilePtr) + outfile, err := os.OpenFile(*logfilePtr, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644) if err != nil { panic(err) }