Skip to content

Instantly share code, notes, and snippets.

View mayrsascha's full-sized avatar
🏠
Working from home

Sascha Mayr mayrsascha

🏠
Working from home
View GitHub Profile
@mayrsascha
mayrsascha / cbl.gs
Last active October 23, 2020 15:28 — forked from patt0/cbl.js
ContinuousBatchLibrary is a Google Apps Script library that manages large batches and works around the 5 minute limitation of GAS execution. It does this by setting time based triggers in the future as well as memorising the last processed key in the batch in order to restart from the correct position. At the end of the batch a cleanup function …
/**
* --- Continous Execution Library ---
*
* Copyright (c) 2013 Patrick Martinent
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
@mayrsascha
mayrsascha / UrlFetchAppWithRetries.gs
Last active February 24, 2022 22:00 — forked from Bajena/RetriableRequestsBatch.gs
Retriable requests batch for Google Apps Scripts. Originally seen on https://medium.com/@sidehacker/nice-did-you-consider-making-this-a-gas-library-dee19ce3db4a. Install it by adding the library script ID "16rm4lelUzHsrF_vLJOwYFh6HvnZHM5LhT8zOn45YvdeQdsZVZmlIOhDP".
/**
* --- UrlFetchApp WITH retries ---
*
* Don't let your script fail easily because of bad API uptime.
*
* Calls provided HTTP requests batch and retries in case of errors. This function has the same
* params and return value as URLFetchApp.fetchAll().
* https://developers.google.com/apps-script/reference/url-fetch/url-fetch-app#fetchurl-params
*
* @param {Array<object>} requests - Array of request param objects

Keybase proof

I hereby claim:

  • I am mayrsascha on github.
  • I am saschamayr (https://keybase.io/saschamayr) on keybase.
  • I have a public key ASCDIbUkOWx7olHwMY4El_mzxFha4HMc7CB7fP48G43CjAo

To claim this, I am signing this object: