What would be the best way of doing this?

I need to make a timer that times a week then runs a line of code I was thinking of using timer but every time the server restarts the timer would restart, any ideas?

cookie.Set stores a value in the SQLite database of the server, assuming you run it server side.
When you do the thing, cookie.Set( “MyCookieName”, os.time() ).
You should probably do it in an infinitely repeating timer, probably a 10 minute one is enough for an entire week.
Compare os.time() with

cookie.GetNumber of your cookie.

A cheap and nasty method would be to have a cron job at the OS level run a command (possibly through RCon) that triggers the event.

Okay, I didn’t really think of those thanks guys for you help.