Skip to content

Instantly share code, notes, and snippets.

@briandeheus
Created September 22, 2016 04:30
Show Gist options
  • Save briandeheus/49ff05fb516483cb3da2f82396a623c8 to your computer and use it in GitHub Desktop.
Save briandeheus/49ff05fb516483cb3da2f82396a623c8 to your computer and use it in GitHub Desktop.
Chronos Simple Service
from time import sleep
from lib import *
import signal
if __name__ == '__main__':
signal.signal(signal.SIGTERM, handle_sigterm)
write_to_file('Starting Chronos')
while True:
# Write the current time to file every 5 seconds
write_time_to_file()
sleep(5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment