月の設定例 | 設定内容 |
---|---|
1,2 | 1 月と 2 月 |
2- | 2 月から 12 月まで |
2-7 | 2 月から 7 月まで |
-7 | 1 月から 7 月まで |
* | 毎月 |
日の設定例 | 設定内容 |
---|---|
1 | 1 日のみ |
1,2 | 1 日と 2 日 |
2- | 2 日から月末まで |
2-7 | 2 日から 7 日まで |
-7 | 1 日から 7 日まで |
mon | 月曜日のみ |
sat,sun | 土曜日と日曜日 |
mon-fri | 月曜日から金曜日 |
-fri | 日曜日から金曜日 |
* | 毎日 |
[設定値] :
設定値 | 説明 |
---|---|
hh:mm[:ss] | 時 (0..23 または *): 分 (0..59 または *): 秒 (0..59)、秒は省略可 |
startup | 起動時 |
usb-attached | USB デバイス認識時 |
usb1-attached | USB ポート 1 デバイス認識時 |
usb2-attached | USB ポート 2 デバイス認識時 |
sd-attached | microSD デバイス認識時 |
sd1-attached | microSD デバイス認識時 |
time で指定した時刻にcommand で指定されたコマンドを実行する。
第 2、第 3、第 4 書式で指定された場合には、それぞれあらかじめ指定された相手先情報番号/トンネル番号/スイッチでの、pp select/tunnel select/switch select コマンドが発行済みであるように動作する。
schedule at コマンドは複数指定でき、同じ時刻に指定されたものはid の小さな順に実行される。
time は hh:mm 形式で指定されたときは秒指定なしとみなされ、hh:mm:ss 形式で指定されたときは秒指定ありとみなされる。秒数に "-" を用いた範囲指定や "*" による全指定をすることはできない。
以下のコマンドは指定できない。
administrator、administrator password、administrator password encrypted、cold start、console info とconsole prompt を除くconsole で始まるコマンド、copy、copy exec、date、delete、exit、external-memory performance-test go、help、http revision-up go、http revision-up schedule、interface reset、less で始まるコマンド、login password、login password encrypted、login timer、login user、luac、make directory、nslookup、packetdump、ping、ping6、pp select、quit、remote setup、rename、rtfs format、rtfs garbage collect、save、schedule at、show で始まるコマンド、sshd host key generate、sshd session、switch control function get FUNCTION、system packet-buffer、telnet、telnetd session、time、timezone、traceroute、traceroute6、tunnel select、user attribute
入力時、command パラメータに対して TAB キーによるコマンド補完は行うが、シンタックスエラーなどは実行時まで検出されない。schedule at コマンドにより指定されたコマンドを実行する場合には、何を実行しようとしたかを INFO タイプの SYSLOG に出力する。
date に数字と曜日を混在させて指定はできない。
startup を指定したスケジュールはルーター起動時に実行される。電源を入れたらすぐ発信したい場合などに便利。
# schedule at 1 */mon-fri 8:00 pp 1 isdn auto connect on # schedule at 2 */mon-fri 17:00 pp 1 isdn auto connect off # schedule at 3 */mon-fri 17:05 * disconnect 1
# schedule at 1 *:00 pp 1 isdn auto connect on # schedule at 2 *:15 pp 1 isdn auto connect off # schedule at 3 *:15 * disconnect 1
# schedule at 1 1/1 0:0 * ip route NETWORK gateway pp 2
# schedule at 1 12:*:00 * lua script.lua # schedule at 2 12:*:20 * lua script.lua # schedule at 3 12:*:40 * lua script.lua
# schedule at 1 */* 03:00 switch 00:a0:de:01:02:03 switch control function execute restart # schedule at 2 */* 03:00 switch lan1:4 switch control function execute restart