-
Notifications
You must be signed in to change notification settings - Fork 196
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
support a cron expression #4
Comments
I like it very much. We have an open issue at iainmckay/docker-mysql-backup#2 where we are discussing it. |
Is it still being considered to handle scheduling inside the container using |
It hasn't been discussed in quite some time, still very open to it. How would it work? Are you just thinking of a different scheduling UI, so instead of I assume the implementation would continue to use a loop for actual implementation, just match by the crontab format? |
i personally feel very comfort with the while loop, because every extra service that is involved, can cause trouble, so less dependencies, less problems. because of the |
@deitch I think the crontab entry format variable as an alternative to the begin/freq variables implementation would be easiest to keep it simple. It should only be an override to default behavior so other people who want to use it as a run once if they choose would just use the current default implementation. An example of another approach with a separate wrapper image for the cron implementation referencing the lower level (this) image to implement the cronjob control is another idea - so the cron implementation at the docker level comes in as an alternative but with a second image layer above the main image (i.e. mysql-backup-cron that uses FROM deitch/mysql-backup). Just another idea. In our case, the goal would be to remove the need for the host to use cron to manage the jobs, to keep all things configurable in one place (i.e. the docker-compose file) and to further reduce the need to have access to the host at that level but still have all of the controls one would expect if they were administering at the host level (i.e. standard tools like cron, just in the container) |
That makes sense. The less you need the host, the more you can stop caring where it runs (and security is better). |
I am struggling with the cron algorithm. How to parse a cron expression and get a result that says, "next time to execute will be in x seconds". Any ideas? |
It actually is easy to say, "should I do this now", but much harder to say "when should I do this next?" Systems with actual cron just go ahead and test every second, and get a boolean true/false. I would like to avoid that expensive loop for an administrative process. |
See #83 . Initial testing is good, would love to see more. |
Hi,
it would be useful to support a cron expression, as an alternative to a delay.
If the merge with the https://github.com/iainmckay/docker-mysql-backup project occurs, a cron expression will be present in the resulting merge.
best regards,
Charles.
The text was updated successfully, but these errors were encountered: