はじめに
Windowsのタスクスケジューラを使ってプログラムを自動で実行させる
Pythonで作ったプログラムを自動で実行させるためにタスクスケジューラを使いましたので、やり方のメモです。
タスクスケジューラ
検索で「タスク」って入れると出てくる
こんな画面

「操作」→「タスクの作成」

名前は適当でOK
構成は、僕はWindows10なのでそれ選びました。

トリガー設定します。

ポチポチ決めるだけ。
次は「操作」そのトリガーで何するか決めます。

pythonのスクリプト動かす時は「プログラムの開始」

「プログラム/スクリプト」でpython.exeファイルの場所を指定します。
これ、ちょっとハマりました。Pythonが複数入ってると、ちゃんと指定しないと動きません。
「引数の追加」には、起動するプログラムのファイル名「○○.py」を入れます。
「開始(オプション)」は「引数の追加」で指定したファイルのある場所のPATHを指定します。
これでOK
コメント