It's possible! Here's what I would do:
intervalposition = 1
intervals = [0,1,3,5,10,20,30,60]
last_action_time = 0
# here is your action code!
action_interval = intervals[intervalposition]
next_action_fire_time = last_action_time + action_interval
if time.time() > next_action_fire_time:
last_action_time = time.time()
So here you're running the
main() function all the time, but it is checking if it's the right time to call
action(), which is where your code will go. Since
action_interval is being checked continuously, you can change your interval position and it'll react immediately.