How to run periodical task
In TextToSoftware, we can use smart part “Rule” to implement a task that can run periodically.
Here is how to do it.
- Create a single element and change its type to “Rule” and add to a group
- Open “Rule” smart part and input task code
The SageteaCloud WebServer will “Rule” around every 10 seconds as long as the user stays in the page that contains the “Rule” element.
By checking the current time, you can customize the time interval for tasks.
One thing to remember, the mechanism abovementioned is page specific, if the user doesn’t stay on the page that contains the “Rule” element, the “Rule” will never be called.
There is another way called server-side rule which supports running task periodically on the server side. This method does not depend on certain page.
The server-side rule is currently in development and will be released in the next major version.