@@ -191,6 +191,11 @@ func Run(c *cobra.Command, names []string) {
191191 if enableUpdateAPI {
192192 updateHandler := update .New (func () { runUpdatesWithNotifications (filter ) }, updateLock )
193193 httpAPI .RegisterFunc (updateHandler .Path , updateHandler .Handle )
194+ // If polling isn't enabled the scheduler is never started and
195+ // we need to trigger the startup messages manually.
196+ if ! unblockHTTPAPI {
197+ writeStartupMessage (c , time.Time {}, filterDesc )
198+ }
194199 }
195200
196201 if enableMetricsAPI {
@@ -261,6 +266,7 @@ func formatDuration(d time.Duration) string {
261266
262267func writeStartupMessage (c * cobra.Command , sched time.Time , filtering string ) {
263268 noStartupMessage , _ := c .PersistentFlags ().GetBool ("no-startup-message" )
269+ enableUpdateAPI , _ := c .PersistentFlags ().GetBool ("http-api-update" )
264270
265271 var startupLog * log.Entry
266272 if noStartupMessage {
@@ -286,8 +292,15 @@ func writeStartupMessage(c *cobra.Command, sched time.Time, filtering string) {
286292 until := formatDuration (time .Until (sched ))
287293 startupLog .Info ("Scheduling first run: " + sched .Format ("2006-01-02 15:04:05 -0700 MST" ))
288294 startupLog .Info ("Note that the first check will be performed in " + until )
295+ } else if runOnce , _ := c .PersistentFlags ().GetBool ("run-once" ); runOnce {
296+ startupLog .Info ("Running a one time update." )
289297 } else {
290- startupLog .Info ("Running a one time update." )
298+ startupLog .Info ("Periodic runs are not enabled." )
299+ }
300+
301+ if enableUpdateAPI {
302+ // TODO: make listen port configurable
303+ startupLog .Info ("The HTTP API is enabled at :8080." )
291304 }
292305
293306 if ! noStartupMessage {
0 commit comments