Python modify variable with timeline, curve or something similar.

Hi. so i think that this is possible. I need this to slowly change the light color for day/night cycle.

The easiest way would be to keyframe the lamp colour, e.g from 1 to the end number, if the cycle was 5 minutes, the script would run at 60* a second, so it would do 60 frames a second, therefore, 60 frames = one second, thus to animate a 5 minute cycle:
56060
use a python script to set a variable (int) and add one to it each time (e.g)
owner[“property”] += 1 (adds one)

i know what you mean. but i dont know how to keyframe light color. but anyway… i think that the simplest way would be to animate the day/night cycle (if you know hot to keyframe the light color and other properties) and then just calls the frames with python script.