How to execute server code periodically

Gamedonia offers you the possibility to execute a specific script periodically from server side. You may want to clean up a collection once a week, or give a bonus to players every day of the week at 10:00. You can do this with our Scheduled Jobs!

When creating this kind of script, you will need to fill in the code you want to be executed and a schedule for the script. Go to Server Code > Scheduled Jobs. There you can click on Create Script and set the schedule of the new job. You can change the schedule later, of course!

You can also force a run of a script at any time with the Run Now option. This is useful to test or to decide exactly when you want a one-time update to take place.

Scheduled jobs can have 2 states:

  • Enabled: The script will run at the specified schedule (for instance, once every 30 minutes).
  • Disabled: The script won't run by schedule. It will still run if you use the Run now option.

More info here: Server code guide