I created a custom Google Apps script that uses data from a different sheet in the same spreadsheet file, which works as intended. However, after a period of time, the function gets called again and returns all '0's in every cell, including closing and reopening the file after a while.
It's a custom function that takes in 3 parameters from different sheets, and is simply called from A1 in it's own sheet.
=DataCalc('Set-Up'!E2, 'Set-Up'!D6:D, 'Data Entry'!N2:R)
I'm retrieving the other sheet via
var ss = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Calculations");
if that's a potential culprit.
The function works again if I delete and replace the function in the cell.