# Timer Routines And Graceful Shutdowns In Go

DevFeed: [Timer Routines And Graceful Shutdowns In Go](<https://devfeed.tech/articles/timer-routines-and-graceful-shutdowns-in-go-22076.md>)

Original publisher: [Read original article](<https://www.ardanlabs.com/blog/2013/09/timer-routines-and-graceful-shutdowns.html>)

Published: 2013-09-04T00:00:00Z

Content type: tutorial

Language: en

Sources: [William Kennedy](<https://devfeed.tech/sources/william-kennedy.md>)

Topics: [Go Language](<https://devfeed.tech/topics/go-language.md>), [Processes](<https://devfeed.tech/topics/processes.md>)

Tags: [ardan-labs](<https://devfeed.tech/tags/ardan-labs.md>), [blog](<https://devfeed.tech/tags/blog.md>), [commands](<https://devfeed.tech/tags/commands.md>), [go](<https://devfeed.tech/tags/go.md>), [go-programming](<https://devfeed.tech/tags/go-programming.md>), [golang](<https://devfeed.tech/tags/golang.md>), [process](<https://devfeed.tech/tags/process.md>), [programming](<https://devfeed.tech/tags/programming.md>), [terminal](<https://devfeed.tech/tags/terminal.md>)

## AI overview

This Go tutorial explains timer routines and graceful shutdowns for a long-running data server. It uses radar-image retrieval jobs to illustrate periodic work and introduces a complete working code sample.

## Source excerpt

In my Outcast data server I have several data retrieval jobs that run using different go routines. Each routine wakes up on a set interval. The most complex job is the downloading of radar images. What makes this complex is that there are 155 radar stations throughout the United States that take a new picture every 120 seconds. All these radar images can be put together to create a mosaic. When the go routine wakes up to pull down the new images, it must do this as quickly as possible for all 155 stations. If it doesn't, the mosaics will be out of sync and any overlays across station boundaries will look off.