Skip to content

Instantly share code, notes, and snippets.

@tumf
Created February 20, 2012 01:36
Show Gist options
  • Select an option

  • Save tumf/1867101 to your computer and use it in GitHub Desktop.

Select an option

Save tumf/1867101 to your computer and use it in GitHub Desktop.
process supervisor
#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
# process supervisor
cmd = ARGV
cmd = cmd.join(" ")
while true
puts "process '%s' start at %s" % [cmd,Time.now]
system(cmd)
sleep 1
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment