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

Add option for a cron based schedule #87

Closed
wants to merge 4 commits into from

Conversation

etzelc
Copy link

@etzelc etzelc commented Dec 2, 2022

Run the service updates specified by a cron schedule.

An environment variable SLEEP_SCHEDULE is introduced, which has to be a valid unix cron schedule of five fields. Example 0 8,16 * * * --> every day at 08:00 and 16:00

If SLEEP_SCHEDULE is set, any value in SLEEP_TIME is ignored unless the calculated next schedule time is an implausible value. Then it defaults to SLEEP_TIME.

Because I have not found the Korn Shell ksh93 in an alpine repository it is compiled and copied to the final image during the docker multi-stage build.

@etzelc
Copy link
Author

etzelc commented Dec 3, 2022

On my local machine the arm64 build is successful. Maybe an issue on the CI machine?

@etzelc
Copy link
Author

etzelc commented Dec 5, 2022

  • Made the script more robust against miscalculations of the next scheduled run.
  • Use the currently latest version (v1.0.4) of ksh93 instead of the dev branch.
  • Optimized git clone to only load used tag and no history
  • Additionally I tried to use Bash to avoid the arm64 CI build fail, but as you can see not successful.

@etzelc etzelc closed this Jan 17, 2023
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.

1 participant