Documentation ¶
Overview ¶
Package gocron allows to regularly run a job, and to be notified, when that run failed. Notifications can happen through e-mail, browser notifications, or a local file.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cron ¶
type Cron struct { Interval time.Duration LifeTime time.Duration // if set, we (and our webserver) exit after this time Job func() error Mail *MailAlert Notif *Notification File *StaticFile }
type MailAlert ¶
type Notification ¶
type Notification struct { Host string Msg string Timeout time.Duration // if set, we close the tab after this duration // contains filtered or unexported fields }
func (*Notification) Send ¶
func (n *Notification) Send(err error) error
func (*Notification) ServeHTTP ¶
func (n *Notification) ServeHTTP(w http.ResponseWriter, r *http.Request)
type StaticFile ¶
func (*StaticFile) WriteAlert ¶
func (s *StaticFile) WriteAlert(jobErr error) error
Click to show internal directories.
Click to hide internal directories.