I have a spreadsheet with a custom function calling a web API like this:
function myFunction(value) {
var value = value
...
}
and I call this function in different cells in B column in this way:
=myFunction(A2)
=myFunction(A3)
=myFunction(A4)
...
so that the values change regarding the content of A column.
Now, I would like to update all these functions with a trigger, which could be every minute, or every hour, or at midnight. I used the built in trigger on Google Apps Script interface, like I did in the past with external scripts, but it doesn't work (I think because the trigger call the function without the "value" variable). I was thinking to add an external triggered script that update the value of another cell (let's suppose "C1"), and then use the onEdit function to update the custom functions. I searched a lot about onEdit, but I really didn't understand how to make it works in my case. Should the onEdit function recall myFunction? In what way?
Any help is appreciated, thank you

function myFunction(value, now) { var value = value var now = data.getRange('a1').getValue(); //a cell with =now() formula ... }should I call the "now" argument in every cell containing the custom function? - user4737227