Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cron update #209

Merged
merged 28 commits into from
Jan 31, 2024
Merged

Cron update #209

merged 28 commits into from
Jan 31, 2024

Conversation

Luatan
Copy link
Contributor

@Luatan Luatan commented Jan 29, 2024

Context

Choices

  • using the steamapi to get the current build and compare it to the buildId in the file palworld\steamapps\appmanifest_2394010.acf. I am not sure it that is the best way to check. Maybe you have input on this.
  • to "update" the server, the script will broadcast a message to the players and restart the server in x minutes. This will only work if the env UPDATE_ON_BOOT is set.
  • I have set the default cron expression to once per hour and the warning minutes to 30 minutes

Test instructions

  1. Set UPDATE_CRON_EXPRESSION to * * * *
  2. Set WARN_MINUTES to 1
  3. check in the log that the cronjob is running correctly
  4. (Optional) login to the server and create a character
  5. change the buildId on line 11 in the file `palworld\steamapps\appmanifest_2394010.acf`` to any other value (for example 13289561)
  6. Verify that the server restarts in one Minute after the cronjob has started

A Real world test is still needed

Checklist before requesting a review

  • I have performed a self-review of my code
  • I've added documentation about this change to the README.
  • I've not introduced breaking changes.

@Luatan Luatan marked this pull request as ready for review January 29, 2024 19:38
scripts/update.sh Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
scripts/start.sh Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
scripts/update.sh Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
scripts/update.sh Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
Co-authored-by: Carlos Martinez <[email protected]>
README.md Outdated Show resolved Hide resolved
Co-authored-by: Carlos Martinez <[email protected]>
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
Copy link
Contributor

@Dashboy1998 Dashboy1998 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me.

@Luatan
Copy link
Contributor Author

Luatan commented Jan 30, 2024

Works for me.

thank you for the review and fixing my bad code. Great Input, you're a legend 💯

@Dashboy1998
Copy link
Contributor

Works for me.

thank you for the review and fixing my bad code. Great Input, you're a legend 💯

You're code was pretty good already. I just pointed out a few typos and mentioned a few edge cases.

@thijsvanloef thijsvanloef linked an issue Jan 31, 2024 that may be closed by this pull request
@thijsvanloef
Copy link
Owner

@Luatan thanks for your work!

@thijsvanloef
Copy link
Owner

@Luatan Some linting errors remain, if they are solved, will merge and add to next release :)

@thijsvanloef
Copy link
Owner

@Luatan Tested it locally ran into no issues, thank you for your amazing work, merging :)

@thijsvanloef thijsvanloef merged commit 124a8d4 into thijsvanloef:main Jan 31, 2024
4 checks passed
@Luatan Luatan deleted the cron-update branch January 31, 2024 15:55
MusclePr pushed a commit to MusclePr/palworld-server-docker that referenced this pull request Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

check for available updates automatically
3 participants