Created
August 10, 2011 08:47
-
-
Save daz/1136395 to your computer and use it in GitHub Desktop.
Using Ruby to schedule jobs with UNIX `at` command
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
time = Time.now + 60 | |
queue_command = <<-CMD | |
at -t #{time.strftime('%Y%m%d%H%M')} <<-AT | |
echo "ran at #{time}" > output.txt | |
CMD | |
system queue_command |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment