In my previous post I wrote about Backendless server-side timers – blocks of code which run on – 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 it 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:
- Login to Backendless console, select your app and click the Business Logic icon.
- Click Timers in the menu on the left.
- Click the Add Timer button:
- The New Timer popup supports every single scheduling option. For example, creating a timer which runs only once:
Whatever the scheduling selection happens to be, enter a name for the timer, optionally select an expiration date/time and click Save.
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.