GAS(GoogleAppScript)のタイマータスク「ClockTriggerBuilder」

 
GAS(GoogleAppScript)触るようになって、 タイマーでキックできないのかとおもったら なんでも「ClockTriggerBuilder」というのがあってそれでできるみたい。 こんな感じでシンプルです


var functionname= 'MainFunction';//キックしたいファンクション名
var minutes = 120;//何分後
ScriptApp.newTrigger().timeBased().after(minutes * 60 * 1000).create();
便利ですねー。

0 件のコメント :

コメントを投稿