# Use Cloud Code

> Understand how you can use Cloud Code modules or scripts with the Triggers service.

You can set up a trigger to run a Cloud Code script or module to execute your custom server-side logic.

Cloud Code lets you write and run server-side code without managing infrastructure. For more information, refer to [Cloud Code](/cloud-code.md).

Triggers enable you to run Cloud Code automatically in response to server events, without requiring client requests. For example, you can use this pattern for the following tasks:

* Automate rewards: Give top players seasonal bonuses without a request from the client.
* Send notifications: Wish players happy new year, congratulate level ups, or alert them of competitive updates.
* Initialize data: Seed new players with default game configuration on sign-up.
* Maintain server state: Sync player achievements across services, enforce game rules, or moderate content
* Time-based events: Execute actions at specific moments using the Scheduler service

[Set up Cloud Code](/triggers/use-cloud-code/setup-cloud-code.md): Set up Cloud Code scripts or modules to use with the Triggers service.
[Use Access Control](/triggers/use-cloud-code/access-control.md): Control access to Unity Gaming Services by creating rules to restrict service APIs.
[Cost](/triggers/use-cloud-code/cost.md): Understand that Triggers currently do not incur additional costs beyond Cloud Code invocations.
