AppOnIdle

From the Scripting Manual
procedure AppOnIdle(Ticks: integer); Parameter Info: Ticks (Integer): Current tick count. Description: This procedure will be called every second by default. You may use this procedure to add timers to your server. See below for examples:

Examples
A timer to execute every 5 minutes:

A timer to execute every 30 seconds: