-
Notifications
You must be signed in to change notification settings - Fork 178
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
@reboot #63
Comments
I don't think so 😞 Have you found any solution for this? |
No solution for this. I currently use supercronic to run jobs inside my docker. It's very lightweight and simple, but alas, that too does not support @reboot command. To get around this, I actually run a shell script, which first runs the command, then runs supercronic. Messy but workable. |
Supercronic looks good, but I need to have a separate container with cron jobs. I see, that supercronic does not support that feature. So far, I added entrypoint.sh file with startup jobs, to one of my containers. It replaces @reboot pretty good. |
I don't understand what you mean. I use supercronic to run other docker containers.
@reboot is better because it handles failures in a more streamlined way, using the entrypoint is less ideal because you need to somehow handle failure, plus the logging is a different format. Other than that it is acceptable. |
OK, maybe I did a mistake. I did not know that I can use docker.sock to run command on the other container. Do you have any example of using this? I think I understand this, but working example would be great. Yeah, I know that running cron jobs in entrypoint is not the best idea, but lucky me, all my cron jobs are logged in database either. So far, I can use it this way. |
@hongkongkiwi, I'm not sure that I understand the question.
exactly? Like to actually reboot docker host? 🤔 |
No, @reboot runs when the crond service is started upon boot. If you take the following, it would look like this: So, the reboot command is immediately run when the daemon is started, the reason it's called reboot is in a normal linux system, this happens once upon boot, in our docker obviously it would be each time the docker is restarted. These are conventions for modern cron daemons, the @hourly is just a nice helper since it can be also done with something like * 0 * * , but reboot is a special flag. Take syncing files, you will want it to happen immediately to get things up to date, then you will want it at a regular interval after that. |
Got it, thanks! |
related #79 |
For anyone still reading this, this issue is solved in PR #184. You can use the fork for now if you need the functionality. |
Does ofelia support @reboot command?
The text was updated successfully, but these errors were encountered: