---
title: "Programming of Sunrise Sunset Timer"
canonical: "https://docs.cuesystem.com/space/CVCAPPLETS/440860680/Programming%20of%20Sunrise%20Sunset%20Timer"
format: markdown
---
The SunriseSunsetTimer applet automatically generates the OnSunrise and OnSunset process events. You can place the desired commands to processes linked with these events. You can create a process linked to an event by standard “Right Click” way (see picture below).

#### Example:

```visualbasic
Private Process SunriseSunsetTimer1_OnSunrise( ) Link SunriseSunsetTimer1.OnSunrise

               DebugPrint ("Event On Sunrise")

End Process

Private Process SunriseSunsetTimer1_OnSunset( ) Link SunriseSunsetTimer1.OnSunset

               DebugPrint ("Event On Sunset")

End Process
```

In this example, the text “Event On Sunrise” will be printed to the debug window at the time of sunrise, and the text “Event On Sunset” will be printed to debug window at the time of sunset.