<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>maru0014</author_name>
  <author_url>https://blog.hatena.ne.jp/maru0014/</author_url>
  <blog_title>自動化厨のプログラミングメモブログ │ CODE:LIFE</blog_title>
  <blog_url>https://codelife.cafe/</blog_url>
  <categories>
    <anon>PowerShell</anon>
    <anon>bat</anon>
  </categories>
  <description>バッチファイルで自分自身をタスクスケジューラに登録して再起動後も実行させようと思っても「コンピューターを AC電源で使用している場合のみタスクを開始する(P)」という項目がONの場合はノートPCが電源に接続されていない状態だとタスクを実行してくれない。 しかし、タスクスケジューラを操作できる schtasks コマンドで変更可能な項目は限られており、この項目もコマンドでは変更不可能なためどうしたものかと調べていたらxmlを直接操作することで変更できたのでご紹介。 バッテリー駆動でもタスクを実行させる関数 function disableOnlyRunAc-Task($taskName){ $t…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fcodelife.cafe%2Fentry%2Fschtasks-edit-xml&quot; title=&quot;タスクスケジューラのxmlをコマンドで直接編集してバッテリーモードでも実行させる - 自動化厨のプログラミングメモブログ │ CODE:LIFE&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>https://cdn-ak.f.st-hatena.com/images/fotolife/m/maru0014/20200912/20200912123732.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2020-09-13 18:00:00</published>
  <title>タスクスケジューラのxmlをコマンドで直接編集してバッテリーモードでも実行させる</title>
  <type>rich</type>
  <url>https://codelife.cafe/entry/schtasks-edit-xml</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
