<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>Takachan</author_name>
  <author_url>https://blog.hatena.ne.jp/Takachan/</author_url>
  <blog_title>PG日誌</blog_title>
  <blog_url>https://takap-tech.com/</blog_url>
  <categories>
    <anon>C#</anon>
    <anon>.NET</anon>
    <anon>.NET Core</anon>
    <anon>.NET Framework</anon>
    <anon>ネタ</anon>
  </categories>
  <description>C# で Timer を使って1日1回任意の時間に処理を実行する方法を紹介したいと思います。 タスクスケジューラーにC#のプログラムを登録すれば、特別な実装をしなくてもOSが自動で処理を起動してくれます。が、その手段が取れない or 長時間起動しているプロセス中で自分で好きな時間に処理を日に1回だけ起動したいなどの用途を想定しています。 確認環境 考え方 使用方法 実装コード 確認環境 .NET6 + C# 10.0 VisualStudio2022 Windows11 考え方 実装の考え方は以下の通りです。 System.Timers.Timer を使用する Timer のイベントを1秒に1…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftakap-tech.com%2Fentry%2F2022%2F07%2F26%2F233234&quot; title=&quot;【C#】Timerで1日1回任意の時間に処理を実行する - PG日誌&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>2022-07-26 23:32:34</published>
  <title>【C#】Timerで1日1回任意の時間に処理を実行する</title>
  <type>rich</type>
  <url>https://takap-tech.com/entry/2022/07/26/233234</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
