Created
          February 9, 2016 14:18 
        
      - 
      
- 
        Save erickoledadevrel/94dab8e8c5df362e6fcc to your computer and use it in GitHub Desktop. 
    Time-based trigger for specific time
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | 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