You need to use:
setInterval(updateNamespace.update, 600000);
(Note the remote call ().)
Your code, as written, will call updateNamespace.update when calling setInterval. Consequently,
setInterval(updateNamespace.update(), 600000);
estimated as
setInterval(undefined, 600000);
You want to pass setInterval reference to your function, not the result of calling it.
source share