回答編集履歴

1

追記

2023/02/11 00:53

投稿

YAmaGNZ
YAmaGNZ

スコア10555

test CHANGED
@@ -43,4 +43,17 @@
43
43
  [newTrigger(functionName)](https://developers.google.com/apps-script/reference/script/script-app?hl=ja#newtriggerfunctionname)
44
44
  [Class TriggerBuilder](https://developers.google.com/apps-script/reference/script/trigger-builder?hl=ja)
45
45
 
46
+ ---
47
+ 追記
46
48
 
49
+ 毎月5日にトリガー動作させたほうがよろしいかとは思います。
50
+ ```GAS
51
+
52
+ //本日の日付を取得
53
+ const today = new Date();
54
+ const year = today.getFullYear(); //年
55
+ const month = today.getMonth()+1; //月
56
+
57
+ ```
58
+ とすれば年、月は取得できますのでそれを利用して処理内で分岐するのがいいでしょう。
59
+