Сообщение об ошибке при неудачном резервном копировании файла уже удален - PullRequest
0 голосов
/ 18 февраля 2020

Я использую скрипт приложений Google, обнаруженный при переполнении стека, для ежедневного резервного копирования файлов по времени. Теперь я удалил несколько из этих файлов и получил электронное письмо от apps-scripts-notifications@goggle.com о том, что сценарию не удалось завершить sh успешно.

Используя этот код:

// Abhijeet Chopra
// 26 February 2016
// Google Apps Script to make copies of Google Sheet in specified destination folder

function makeCopy() {
  // generates the timestamp and stores in variable formattedDate as year-month-date hour-minute-second
  var formattedDate = Utilities.formatDate(new Date(), "GMT", "yyyy-MM-dd' 'HH:mm:ss");  
  // gets the name of the original file and appends the word "copy" followed by the timestamp stored in formattedDate
  var name = SpreadsheetApp.getActiveSpreadsheet().getName() + " Copy " + formattedDate;  
  // gets the destination folder by their ID. REPLACE xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx with your folder's ID that you can get by opening the folder in Google Drive and checking the URL in the browser's address bar
  var destination = DriveApp.getFolderById("1ysgERhjmrnq5Uzb9Lu7CtqOWccVTHyVj");  
  // gets the current Google Sheet file
  var file = DriveApp.getFileById(SpreadsheetApp.getActiveSpreadsheet().getId())  
  // makes copy of "file" with "name" at the "destination"
  file.makeCopy(name, destination);
}

Ошибка сообщение Для выполнения этого действия требуется авторизация.

Поскольку файл больше не находится в моей папке Tra sh на моем Google Диске, я не знаю, как отключить эту попытку сделать резервную копию файла, который больше не должен существовать. Я также не мог найти больше активных триггеров.

Я действительно ценю некоторый вклад! Спасибо.

...