Advertisement
Awn_pastebin

termProcCode.gs

Mar 11th, 2015
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function termProc() {
  2.   /***************************************************************************
  3.   終了処理
  4.   ****************************************************************************/
  5.   /*
  6.   処理の概要
  7.   :各変数を初期化
  8.   :次回の初期処理のトリガーを
  9.   :セットする
  10.   */
  11.  
  12.   /*
  13.   処理実行の契機
  14.   :主処理に自動でスケジュールされ実行
  15.   */
  16.  
  17.   //トリガーレコーダーに記録
  18.   var thisPROCNAME = "termProc";
  19.   var thisSTAT = "STARTED";
  20.   //var thisSTAT = "ENDED";
  21.   triggerRecorder(thisPROCNAME,thisSTAT);
  22.  
  23.   //要約データの作成
  24.   dataSummarize1();
  25.   dataSummarize2();
  26.  
  27.  
  28.   //プロパティの初期化
  29.   setInitProp();
  30.  
  31.  
  32.   //トリガーの削除
  33.   deleteAllTriggers();
  34.  
  35.  
  36.   //次回の初期処理を実行するトリガーをセットする
  37.   Logger.log("終了処理が無事終了");
  38.   ScriptApp.newTrigger("initProc")
  39.   .timeBased()
  40.   .atHour(1)//翌日の深夜1時~2時にセット
  41.   .everyDays(1)
  42.   .create();
  43.  
  44.   //トリガーレコーダーに記録
  45.   var thisSTAT = "ENDED";
  46.   triggerRecorder(thisPROCNAME,thisSTAT);
  47.  
  48. }//END_OF_termProc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement