arkmanager / ark-server-tools

Set of server tools used to manage ARK: Survival Evolved servers on Linux
MIT License
678 stars 143 forks source link

cronjob not setting instance #1204

Closed l3uGsY closed 2 years ago

l3uGsY commented 2 years ago

Arkmanager 1,6 Arch cronie

I am have issues getting instance names set with Arkmanager. Every time I specify, it defaults to @all. Pardon my noobness, I am new to Linux, like less then 20hrs at the desk. On top of that It only seems to keep 2. My apologizes if this something I missed in your Wiki.

╭─steam@ArkServer in ~ took 4ms
[🔴] × crontab -r

╭─steam@ArkServer in ~ took 2ms
╰─λ arkmanager install-cronjob update --daily --hour=6 --warn --saveworld @island
no crontab for steam

╭─steam@ArkServer in ~ took 16ms
╰─λ arkmanager install-cronjob update --daily --hour=6 --warn --saveworld @island

╭─steam@ArkServer in ~ took 16ms
╰─λ crontab -l
0 6 * * * /usr/local/bin/arkmanager --cronjob update @all  --warn --saveworld --args  -- >/dev/null 2>&1

╭─steam@ArkServer in ~ took 2ms
╰─λ arkmanager install-cronjob restart --daily --hour=6 --minute=2 --warn --saveworld @Aberration

╭─steam@ArkServer in ~ took 17ms
╰─λ crontab -l
0 6 * * * /usr/local/bin/arkmanager --cronjob update @all  --warn --saveworld --args  -- >/dev/null 2>&1
2 6 * * * /usr/local/bin/arkmanager --cronjob restart @all  --warn --saveworld --args  -- >/dev/null 2>&1

╭─steam@ArkServer in ~ took 2ms
╰─λ arkmanager install-cronjob restart --daily --hour=6 --minute=4 --warn --saveworld @Extinction

╭─steam@ArkServer in ~ took 15ms
╰─λ crontab -l
0 6 * * * /usr/local/bin/arkmanager --cronjob update @all  --warn --saveworld --args  -- >/dev/null 2>&1
4 6 * * * /usr/local/bin/arkmanager --cronjob restart @all  --warn --saveworld --args  -- >/dev/null 2>&1

╭─steam@ArkServer in ~ took 2ms
╰─λ arkmanager install-cronjob restart --daily --hour=6 --minute=2 --warn --saveworld @Aberration

╭─steam@ArkServer in ~ took 17ms
╰─λ crontab -l
0 6 * * * /usr/local/bin/arkmanager --cronjob update @all  --warn --saveworld --args  -- >/dev/null 2>&1
2 6 * * * /usr/local/bin/arkmanager --cronjob restart @all  --warn --saveworld --args  -- >/dev/null 2>&1
l3uGsY commented 2 years ago

So I figured it out, manually changing the @all. But I am curious if I went about this the right way. I've tried the restart feature for restart @all --warn. It's takes 90minutes for all 3 servers to fully reboot. So I went with 3 separate.

Is it better to plan for 15min of downtime. create a cronjob to stop all servers, preform a backup, check for update, apply if needed then start all 15min later?

Anyways, during my search for a solution I noticed a ton of questions about how to setup cronjobs. I think the wiki could use some basic examples like:

Do you want your server to restart every morning? This will start a 30min countdown and restart. arkmanager install-cronjob restart @all --daily --hour=6 --warn --saveworld

Do you want to back up your server before applying an update? This will start a 30min countdown. arkmanager install-cronjob update @all --daily --hour=6 --warn --saveworld --backup

Do you want to broadcast your message of the day periodically? arkmanager install-cronjob rconcmd showmessageoftheday @all --minute=*/45

Do you want to broadcast a message through the server periodically? (wish there was an option for server chat (unsure about broadcastcmd) arkmanager install-cronjob broadcast "Join us on Discord" @all --hourly