我想基于我的Google日历运行此脚本。例如,我想设置在星期一下午1点发送报告,在星期二上午6点发送报告,具体取决于我的callendard上的事件
function sendEmails() {
var sheet = SpreadsheetApp.getActiveSheet();
var emailRange = SpreadsheetApp.getActiveSpreadsheet().getRange("B7");
var emailAddress = emailRange.getValues()
var message = 'message.'
var subjectRange = SpreadsheetApp.getActiveSpreadsheet().getRange("F12");
var subject = 'FV ' + subjectRange.getValues()
var doc = DriveApp.getFileById("id")
;
MailApp.sendEmail(emailAddress, subject, message, {attachments:[doc]});
}