タグ

関連タグで絞り込む (0)

  • 関連タグはありません

タグの絞り込みを解除

pythonとPythonとcronに関するblueleのブックマーク (2)

  • pycron

    Instead of minute, hour, day, month or day of week it's also possible to specify a *. A * represents all possible values for that position (e.g. a * on 2nd position is the same as specifying all the possible values for hour) Several values can be separated by commas: e.g. if a command is to be executed every 10th minute so you can specify 0,10,20,30,40,50 for minute. A range of values can be

  • 時間のインターバルをcron的に扱うPythonモジュール書いた – taichino.com

    ちょっと前の話なんですが、croniterというモジュールを書きました。これは何かというと時間に紐付いた繰り返し処理を扱うモジュールです。例えば「毎週火曜日と木曜日の9時」とか「日曜日の5時から10時まで1時間ごと」にとか、そういう繰り返しを扱いたいときに使う事を想定しています。 基的な使い方は以下になります。お気づきの通りcronと同じ形式で繰り返しを指定します。baseで特定の日時以降での繰り返しです。後はnextを呼び出すたびに次のdatetimeオブジェクトを取得できます。 #!/usr/bin/python from datetime import datetime from croniter import croniter # 2010年8月7日始まりで、平日の9時 base = datetime(2010, 8, 7, 0, 0) iter = croniter('0 9

  • 1