It is common to have a method that needs to run at a certain interval. The sample code below executes a method every Sunday during the midnight hour. The time can easily be changed, but the idea behind the code stays the same.
Insert the following one line of code in the On startup database method:
Create a method named "test_everysunday" and insert the following code:
$time:=Current time\3600 `returns the hour
$day:=Day number(Current date) `returns the day of week
If (($day=1) & ($time=0)) `if it is midnight on sunday
`insert a call to your method here
DELAY PROCESS(Current process;216000)
This code creates a background process which checks the date every time it wakes up. If it is not Sunday the process is delayed again. This is one example of how a background process can be used, there are many other ways to implement and use background processes.