Go ahead and give @tehhowch the check but here's a routine made up from the tutorials found in the Task API which is found here which goes through all of your tasks and adds one day to their due date if their current due date is in the past. I've never used the Task API before so the tehhowch's getExtension example was very helpful.
function addOneDayToDueDates(){
var seconds=1000;
var minutes=60*seconds;
var hours=60*minutes;
var days=24*hours;//this is just my simple minded way of get the millisecond in a day
var nowValue=new Date().valueOf();
var taskLists=Tasks.Tasklists.list();
if(taskLists.items){//loop through all lists
for(var i=0;i<taskLists.items.length;i++){
var taskList=taskLists.items[i];
var tasks=Tasks.Tasks.list(taskList.id);
if(tasks.items){
for(var j=0;j<tasks.items.length;j++){//loop through all task in list
Logger.log('i=%s,j=%s\n',i,j);
var task=tasks.items[j];
var dueValue=new Date(task.due).valueOf();
if(dueValue<nowValue){//date comparison
var newDue = new Date(new Date(task.due).valueOf() + 1*days);
Logger.log('newDue=%s,Due=%s',newDue,task.due);
var newTask = {due: Utilities.formatDate(newDue, "GMT", "yyyy-MM-dd'T'HH:mm:ss'Z'")};
Tasks.Tasks.patch(newTask, taskList.id, task.id);
}
}
}
}
}
}
@tehhowch I spent some time trying to use the pageToken idea you suggested. I was finally able to see the iterations goto to two after getting upto about 350 tasks spread over 35 lists.
Here's my code: (btw I wish the Apps Script documentation was a little more user friendly. I'm using this reference page and the API Explorer to try to figure it all out. If you see any obvious errors I'd appreciate a comment as I'm always trying to learn more)
function listTasks() {
var taskToken;
var iteration=0;
var opts={pageToken:taskToken,maxResults:100};
do{
iteration++;
var myLists=Tasks.Tasklists.list(opts)
if(myLists.items){
for(var i=0;i<myLists.items.length;i++){
var item=myLists.items[i];
Logger.log(item.title + '\n' + item.id + '\n');
var myTasks=Tasks.Tasks.list(item.id)
if(myTasks.items){
for(var j=0;j<myTasks.items.length;j++){
Logger.log(myTasks.items[j].title + '\n');
}
}else{
Logger.log('No tasks for ' + item.title + '\n');
}
}
}
Logger.log('Get Page Token ' + 'Iterations: ' + iteration);
opts.pageToken=myLists.nextPageToken;
}while(opts.pageToken);
Logger.log('End of Function');
}