LANG SELRCT

Apps Script Reference  (Create: Create new Spreadsheet | Create new Apps Script

Monday, May 6, 2019

1時間毎に実行するトリガーをスクリプトで書きたい


1時間ごとにmyFunctionを実行するトリガーをスクリプトで書きたくて



コード.gs
function createTriggers1mins() {
  var trigger = ScriptApp.newTrigger('myFunction')
    .timeBased()
    .everyhours(1)
    .create();
}  

function myFunction() {
  console.log("log: " + new Date()); 
}


参考

timeBased()
https://developers.google.com/apps-script/reference/script/trigger-builder#timeBased()

Latest post

スプレッドシートA列にある複数のテキストをスライドに追加したい(Google Apps Script)

今回Google Apps Scriptでやりたいこと GoogleスプレッドシートA列にある複数の値を取得して Googleスライドに渡して 図形オブジェクトのテキストとして追加したい ① スプレッドシートのA列に値を入れておく ② Code.gsのinsertNewShape...