Welcome to gocron Discussions! #88
Replies: 2 comments 11 replies
-
Hey everyone, I'm using gocron in a server monitoring agent that I'm building and really love the package so far. Something along the lines of: package main
import (
"/module/core"
"github.com/go-co-op/gocron"
)
func main() {
sch := gocron.NewScheduler(time.UTC)
sch.Every(30).Seconds().Do(core.GetCpuUsage())
sch.StartAsync()
} Any advice, help or guidance would be greatly appreciated. Apologies in advance if this a stupid question. |
Beta Was this translation helpful? Give feedback.
-
Hello, I'm a new programmer, and new to Go. I found your package and I think it would be great for the project I am working on. The idea is I want a Go script that will execute a external Go file from CMD I have already made on a 30 minute interval throughout the day. I wanted to build the script into an executable when I was done, so my coworkers could just click it at the start of their shifts and forget about it. I have attempted to build something out, but I can't seem to get it to kick off. I'm sure I'm missing something obvious, but I can't seem to find the solution in the docs. Would you be able to help me out? Here is my code so far.
I'm testing it against a external Python Script here. |
Beta Was this translation helpful? Give feedback.
-
👋 Welcome!
We’re using Discussions as a place to connect with other members of our community. We hope that you:
build together 💪.
To get started, comment below with an introduction of yourself and tell us about what you do with this community.
Beta Was this translation helpful? Give feedback.
All reactions