Open djkrose opened 7 years ago
Is setimout or setinterval not available in the js runtime?
No, because this is part of the window object, which does not exist without browser. I might add these two methods later, but it would still require someone to execute a command initially, after every server restart.
It is also problematic to have long-running scripts, because commands are executed on the main thread and freeze the server while executing. Adding the possibility to delay execution with settimeout is not trivial.
It should be possible to run scripts repeatedly based on timers, similar to a cronjob.