The following script, and trigger, run as intended at the first instance. But then it does not stop! The trigger keeps executing once every minute thereafter!
I only need it to run ONCE, as programmed, and that's it! How do I stop the trigger from executing after the first, intended execution? Any help will be greatly appreciated! PS: This is my first attempt at writing a Google Sheet Script, so please make the answer simple to understand!
function sendWAnow(){
var ss = SpreadsheetApp.getActiveSpreadsheet()
var sheet1=ss.getSheetByName('Reports');
var Date = sheet1.getRange(3,3).getValue();
var subject = sheet1.getRange(4,3).getValue();
var emailAddress = sheet1.getRange(5,3).getValue();
var message = sheet1.getRange(6,3).getValue();
ScriptApp.newTrigger('sendWAnow')
.timeBased()
.at(Date)
.create();
MailApp.sendEmail(emailAddress, subject, message);
}