-
-
Save tumf/1867101 to your computer and use it in GitHub Desktop.
process supervisor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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