internal logic handling for cron webserver

This commit is contained in:
2026-02-11 13:17:15 -06:00
parent 4d2e4ce533
commit 4c152f8089

View File

@@ -73,6 +73,8 @@ func (opts *ConfigOpts) Cron() {
srv := server.NewServer(s, opts.GoCron.Port) srv := server.NewServer(s, opts.GoCron.Port)
// srv := server.NewServer(scheduler, 8080, server.WithTitle("My Custom Scheduler")) // with custom title if you want to customize the title of the UI (optional) // srv := server.NewServer(scheduler, 8080, server.WithTitle("My Custom Scheduler")) // with custom title if you want to customize the title of the UI (optional)
opts.Logger.Info().Msgf("GoCron UI available at http://%s", opts.GoCron.BindAddress) opts.Logger.Info().Msgf("GoCron UI available at http://%s", opts.GoCron.BindAddress)
opts.Logger.Fatal().Msg(http.ListenAndServe(opts.GoCron.BindAddress, srv.Router).Error()) if err := http.ListenAndServe(opts.GoCron.BindAddress, srv.Router); err != nil {
opts.Logger.Fatal().Msg(err.Error())
}
select {} // wait forever select {} // wait forever
} }