Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iaindooley/b406ff0aebc6c9bf1a15e9d834ae5cbb to your computer and use it in GitHub Desktop.
Save iaindooley/b406ff0aebc6c9bf1a15e9d834ae5cbb to your computer and use it in GitHub Desktop.
Set custom field to zero weekly
function setCustomFieldToZeroWeekly(params,signature,original_time)
{
new Board(params).cards().each(function(card)
{
card.setCustomFieldValue("My Number",0);
Utilities.sleep(2000);//custom field value API is VERY heavy, wait or you'll hit the rate limit
});
ExecutionQueue.push("setCustomFieldToZeroWeekly",params,signature,original_time.addDays(7).at("23:59"));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment