I have got a function (called f1 let's say) in a script which takes too many time to run (in a spreadsheet, it s use setformula transpose importrange and query..take about 2min to run).
F1 is used to combine 2 spreadsheets and set the result in some columns in the 2nd spreadsheet using
I scheduled this function to run during the night (with trigger) but everytime someone opens it, the function reruns again (processing the same data). I try to put a void onload() function but f1 running as well even if i am not calling it.
Is there a way to run a function once a day and not when people open the spreadsheet?
Is there a way to cache the result for an entire day..until the function re run through the schedule?
Or is there a way to copy the value (not the formula contains in the cell) of an entire spreadsheet to another (i did not find this in documentation)?
or , is there any other workaround?
thanks for help