In a previous post, we wrote about Backendless server-side timers – blocks of code which run on a pre-defined schedule. A timer is a Java class and can be created by hand. The most tedious part is figuring out the scheduling definition. Currently, this is done by declaring the timer’s schedule through a JSON object in the class’ annotation. Backendless Console significantly simplifies this process through a built-in code generator.
To create a timer:
Whatever the scheduling selection happens to be, enter a name for the timer, optionally select an expiration date/time and click Save.
Backendless automatically generates the source code for the timer and lets you download the entire project with all the sources and dependencies – a huge time saver!
Now that you know how to write or generate Timer code, you are ready to proceed to adding custom code to it. This will be the subject of a future post.