Assigned
Status Update
Comments
bl...@google.com <bl...@google.com>
km...@google.com <km...@google.com>
ha...@gmail.com <ha...@gmail.com> #2
I encountered that issue with my project. I have time-based trigger that appoints next run using time-based trigger.
pt...@gmail.com <pt...@gmail.com> #3
Can we reasonably assume that ES5 will not be removed before this issue is resolved?
@mr...@gmail.com: You probably should star this issue (if you haven't yet) if you are affected by it.
@mr...@gmail.com: You probably should star this issue (if you haven't yet) if you are affected by it.
[Deleted User] <[Deleted User]> #4
Not sure if this is exactly the same issue, but triggers under V8 get deleted when created programatically from a straight script. This extract is from a bigger piece of code that others have worked on, I've tweaked it to just run the core functions. Under V8 the triggers end up disabled without reason, whereas under ES5 it all works as designed.
var ml_howFrequent = 3;
function ml_install(){
//Delete any already existing triggers so we don't create excessive triggers
deleteAllTriggers();
if (ml_howFrequent < 1){
throw "[ERROR] \"ml_howFrequent\" must be greater than 0.";
}
else{
ScriptApp.newTrigger("ml_install").timeBased().after(ml_howFrequent * 60 * 1000).create();//Schedule next Execution
ScriptApp.newTrigger("ml_startSync").timeBased().after(1000).create();//Start the sync routine
}
}
function ml_startSync(){
Logger.log("Output this");
}
function deleteAllTriggers(){
var triggers = ScriptApp.getProjectTriggers();
for (var i = 0; i < triggers.length; i++){
if (triggers[i].getHandlerFunction() == "ml_startSync" || triggers[i].getHandlerFunction() == "ml_install"){
ScriptApp.deleteTrigger(triggers[i]);
Logger.log(triggers[i].getHandlerFunction(), " has been deleted");
}
}
}
var ml_howFrequent = 3;
function ml_install(){
//Delete any already existing triggers so we don't create excessive triggers
deleteAllTriggers();
if (ml_howFrequent < 1){
throw "[ERROR] \"ml_howFrequent\" must be greater than 0.";
}
else{
ScriptApp.newTrigger("ml_install").timeBased().after(ml_howFrequent * 60 * 1000).create();//Schedule next Execution
ScriptApp.newTrigger("ml_startSync").timeBased().after(1000).create();//Start the sync routine
}
}
function ml_startSync(){
Logger.log("Output this");
}
function deleteAllTriggers(){
var triggers = ScriptApp.getProjectTriggers();
for (var i = 0; i < triggers.length; i++){
if (triggers[i].getHandlerFunction() == "ml_startSync" || triggers[i].getHandlerFunction() == "ml_install"){
ScriptApp.deleteTrigger(triggers[i]);
Logger.log(triggers[i].getHandlerFunction(), " has been deleted");
}
}
}
hz...@semios.com <hz...@semios.com> #5
Hi
I also have an issue with trigger.
A script published as a web app and create a time trigger, when a new version of the web app is published with V8 runtime the authorization are lost.
So you have to revert runtime to old one and it goes back to normal way.
Stéphane
I also have an issue with trigger.
A script published as a web app and create a time trigger, when a new version of the web app is published with V8 runtime the authorization are lost.
So you have to revert runtime to old one and it goes back to normal way.
Stéphane
[Deleted User] <[Deleted User]> #6
Hi
I met the same issue here when I tried to create a time-based trigger inside of the script as answered in this post [1].
I have disabled V8 runtime option which made the script working again.
Is there an ETA for this issue?
[1]https://stackoverflow.com/a/8608327
I met the same issue here when I tried to create a time-based trigger inside of the script as answered in this post [1].
I have disabled V8 runtime option which made the script working again.
Is there an ETA for this issue?
[1]
bw...@google.com <bw...@google.com>
ar...@perimeter.company <ar...@perimeter.company> #7
Me too. I only seriously started scripting after v8 was implemented, I thought I was doing something wrong. My script-created triggers work 1/10 times. 9/10 times they seem to be "born" disabled.
ca...@gmail.com <ca...@gmail.com> #8
I have the same issue with this type of code in V8, apparently it hasn't been fixed yet.
Example, I have a trigger for getOrders that runs every 15 minutes, getOrders contains a timeBased trigger for syncStock. This second function gets disabled for unknown reason each time the initial trigger runs.
function getOrders {
// get orders
// delay execution of function syncStock for 2 minutes
var next = ScriptApp.newTrigger("syncStock").timeBased();
next.after(2 * 60 * 1000).create();
}
function syncStock() {
// sync stock
}
Function syncStock keeps getting disabled for unknown reason, it will not run at all.
Example, I have a trigger for getOrders that runs every 15 minutes, getOrders contains a timeBased trigger for syncStock. This second function gets disabled for unknown reason each time the initial trigger runs.
function getOrders {
// get orders
// delay execution of function syncStock for 2 minutes
var next = ScriptApp.newTrigger("syncStock").timeBased();
next.after(2 * 60 * 1000).create();
}
function syncStock() {
// sync stock
}
Function syncStock keeps getting disabled for unknown reason, it will not run at all.
bw...@google.com <bw...@google.com>
ni...@google.com <ni...@google.com> #9
Just adding that I'm also seeing this issue. We have an add-on that allows the user to schedule an update overnight. If the script tries to set another trigger, it will be disabled for an unknown reason.
tr...@gmail.com <tr...@gmail.com> #10
Can confirm this is still happening. Pretty significant bug if you ask me
Description
Working with partitioned tables, I want to be able to hit the cache when doing streaming inserts to one partition but querying a different partition.
[1]: