<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>rubikitch</author_name>
  <author_url>https://blog.hatena.ne.jp/rubikitch/</author_url>
  <blog_title>http://rubikitch.com/に移転しました</blog_title>
  <blog_url>https://rubikitch.hatenadiary.org/</blog_url>
  <categories>
    <anon>ruby</anon>
  </categories>
  <description>特定の時刻にコマンドを実行するには、cronやatがある。一定時間待つにはsleepがある。 特定の時刻まで待つコマンドがわからなったので、速攻でRubyで書いてみた。こんなのはぐぐるよりも書くほうが早いので。 #!/usr/bin/env ruby require 'time' time = Time.parse ARGV.join(&quot; &quot;) secs = time - Time.now puts &quot;Sleep #{secs}seconds (until #{time})&quot; sleep secs 使い方は引数に時刻文字列を書くだけ。 使用例 $ sleep-until 0:30 Sleep …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Frubikitch.hatenadiary.org%2Fentry%2F20091006%2F1254755937&quot; title=&quot;sleep-until - 特定の時刻まで待ち続けるRubyスクリプト - http://rubikitch.com/に移転しました&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2009-10-06 00:18:57</published>
  <title>sleep-until - 特定の時刻まで待ち続けるRubyスクリプト</title>
  <type>rich</type>
  <url>https://rubikitch.hatenadiary.org/entry/20091006/1254755937</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
