<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>thaim</author_name>
  <author_url>https://blog.hatena.ne.jp/thaim/</author_url>
  <blog_title>出力を入力へ</blog_title>
  <blog_url>https://thaim.hatenablog.jp/</blog_url>
  <categories>
    <anon>Ruby</anon>
    <anon>Linux</anon>
  </categories>
  <description>cronジョブをRubyで書くためのgem wheneverで 月末バッチを実現するためのカスタムスクリプトを実装したい． このとき，wheneverのカスタムjob_typeで実現したのでそのまとめ． 月末バッチの実装 cronで月末バッチをスケジュールする場合，月末の判定が面倒． 月末となる日は30日や31日，もしくは28日や29日(2月のうるう年)のような条件があるので， 日付を決め打ちにすることができない． cron書式とは別に月末判定を実施して処理する仕組みが必要である． よくある実装としてはcronで呼び出されるスクリプトの冒頭で， 翌日が1日か判定して1日でなければ処理を終了する…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fthaim.hatenablog.jp%2Fentry%2F2020%2F05%2F30%2F142340&quot; title=&quot;wheneverのカスタムjob_typeで月末バッチを実現する - 出力を入力へ&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>2020-05-30 14:23:40</published>
  <title>wheneverのカスタムjob_typeで月末バッチを実現する</title>
  <type>rich</type>
  <url>https://thaim.hatenablog.jp/entry/2020/05/30/142340</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
