I got this piece of script (runned locally):
You need to call setInterval() without parenthesis on your function, like this:
setInterval(uploadnew, 1000*60*5);
Using parenthesis you're calling it immediately and assigning the result (undefined
) to be run on an interval, instead don't use parenthesis to pass the function itself, not the result of the function.