title: Google app script trigger not working
body: <p>I have a google app script which sends email, and i have set a trigger such that it sends email on every form submit. The problem is the trigger works perfectly fine for initial few minutes, but later even after entering correct data. The script does not send the mail, i have to manually press the execution button of the script. Here is my code</p>
  
  <pre><code>var EMAIL_SENT = "EMAIL_SENT";
  function sendEmailsapp() {
    var sheet = SpreadsheetApp.getActiveSheet();
    var startRow = 2;  // First row of data to process
    var numRows = sheet.getLastRow();   // Number of rows to process
    // Fetch the range of cells A2:B3
  
    var dataRange = sheet.getRange(startRow, 1, numRows,8)
    // Fetch values for each row in the Range.
    var data = dataRange.getValues();
    for (var i = 0; i &lt; data.length; ++i) {
      var row = data[i];
      var emailAddress = row[4];  // First column
      var message = row[5];       // Second column
      var emailSent = row[7];  // Third column
      var money=row[6]
      if (emailSent != EMAIL_SENT) {  // Prevents sending duplicates
        var subject = "You have been registered for follwoing events:-";
        var event;
  
        MailApp.sendEmail(emailAddress, subject, "Please bring your college id and copy of this mail either in phone or printed paper"+
                          "\n\n"+"Name:-"+row[1]+"\n"+"USN:-"+row[2]+"\n"+"Mobile:-"+row[3]+"\n"+"Event:-"+ message+"\nMoney status:-"+money+"You registered on"+row[0]);
          sheet.getRange(startRow + i, 8).setValue(EMAIL_SENT);
  
  
        // Make sure the cell is updated right away in case the script is interrupted
        SpreadsheetApp.flush();
      }
    }
  }
  </code></pre>
  
  <p>The code works fine. The only problem is triggers.</p>
  
  <p>Here is the image of my trigger. sendEmailsapp is the trigger, and sendEmailsweb is another trigger which also suffers from same problem. <img src="https://i.stack.imgur.com/K9cZz.png" alt="image"></p>
  
  <p>here is the log <img src="https://i.stack.imgur.com/4EtKV.png" alt="enter image description here"></p>
  
  <p>My only Problem is the trigger is not getting triggered, it is not with the email being sent.</p>