Child pages
  • Schedule jobs
Skip to end of metadata
Go to start of metadata

Background scripts

Apstrata allows you to create your back-end logic using JavaScript scripts running on Apstrata's servers and having native access to all Apstrata's APIs. You can use these scripts to create your own APIs or you can use them to schedule the execution of a script or to execute recurrent jobs, by saving scheduling or cron information into an Apstrata document, notably passing the name of the server-side script to execute and the date/time at which this script has to be triggered. This information is used by Apstrata to create scheduled scripts or cron jobs.

Back to the map       Next station: define transactions

Example: daily draw

To generate more traction to your game, let us assume that you decide to run a daily draw: one of your registered players is randomly selected and the winner receives a gift. We will create a script - called "scheduleDraw" in this example - which you use to schedule a daily draw or to cancel it (in order to cancel the draw, you will have to pass the "cancel" parameter set to "true"). We also create another script that implements the actual draw. This latter is regularly executed on a daily basis.


Navitabs License Error

The number of licensed users is incompatible with the number of licensed users of Confluence. Please contact your system administrator.

License Details

Dig deeper

Related tutorials