Skip to content

Instantly share code, notes, and snippets.

@erickoledadevrel
Created February 9, 2016 14:18
Show Gist options
  • Save erickoledadevrel/94dab8e8c5df362e6fcc to your computer and use it in GitHub Desktop.
Save erickoledadevrel/94dab8e8c5df362e6fcc to your computer and use it in GitHub Desktop.
Time-based trigger for specific time
function createTrigger() {
var time = new Date();
time.setMinutes(time.getMinutes() + 5);
ScriptApp.newTrigger('run')
.timeBased()
.at(time)
.create();
}
function run() {
DriveApp.createFile('trigger.txt', new Date().toString());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment