- Posts: 373
- Thank you received: 3
Variables (Pre-Load on Startup)
- bitzerjd
- Topic Author
- Offline
- User
-
Less
More
2 years 4 months ago #1928
by bitzerjd
Variables (Pre-Load on Startup) was created by bitzerjd
Is there a way to seed a variable when the server is restarted? I have a few variables (user created) that I would like to have a set value when the server is started/restarted. I set these variables when the system is turned on or off so it's not a big deal, but it would be nice to have.
Please Log in to join the conversation.
- bowlingbeeg
- Offline
- User
-
Less
More
- Posts: 248
- Thank you received: 33
2 years 4 months ago #1931
by bowlingbeeg
Replied by bowlingbeeg on topic Variables (Pre-Load on Startup)
I don't know if there is a better way or not but you could setup and automation that checks the {{current_uptimesecs}} value and if it's below 60 seconds then set your variables. I think it would only fire once but it's possible it would fire multiple times. But there are ways around that with adding a secondary variable if that's an issue.
Please Log in to join the conversation.
- bitzerjd
- Topic Author
- Offline
- User
-
Less
More
- Posts: 373
- Thank you received: 3
2 years 4 months ago #1954
by bitzerjd
Replied by bitzerjd on topic Variables (Pre-Load on Startup)
Thanks! That sounds like it may work.
Please Log in to join the conversation.
- davep
- Offline
- Admin
-
Less
More
- Posts: 367
- Thank you received: 96
2 years 4 months ago #1972
by davep
Replied by davep on topic Variables (Pre-Load on Startup)
ALL server variables are automatically saved and restored every time the server is cleanly shutdown (saved) and started (restored). This is automatic and cannot be disabled.
If there are specific things you would like to perform on system startup and/or system shutdown then you can put them in macros called system.startup and system.shutdown.
If these macros exist then they automatically get executed during the startup or shutdown sequences.
If there are specific things you would like to perform on system startup and/or system shutdown then you can put them in macros called system.startup and system.shutdown.
If these macros exist then they automatically get executed during the startup or shutdown sequences.
The following user(s) said Thank You: bowlingbeeg
Please Log in to join the conversation.
- bitzerjd
- Topic Author
- Offline
- User
-
Less
More
- Posts: 373
- Thank you received: 3
2 years 4 months ago #1976
by bitzerjd
Replied by bitzerjd on topic Variables (Pre-Load on Startup)
Good to know, Thanks!
Please Log in to join the conversation.
Time to create page: 0.175 seconds