-
Notifications
You must be signed in to change notification settings - Fork 493
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
plugin init example at docker start causes duplicated cron #64
Comments
One possible solution would be to replace the proposed crontab command with: crontab -u redmine -l 2>/dev/null | grep -v redmine:recur_tasks >/tmp/cron.redmine |
I've pointed on the same problem in #50 with the filtering solution.... |
@kstange The plugin init mechanism is present mainly to allow for custom operations users may want to run when the image is started. All necessary check should be done by the user who install the plugin init script. In this case it would involve, getting the current list of cron jobs for the redmine user, grep for some pattern, install cron job is pattern is not found. |
I recognize that, my main objective is just to provide a point of feedback on your documentation, such that other people who follow it to the letter don't end up running into issues. |
@kstange yep you are right. I did not realize that line was mentioned in the docs |
The suggested documentation for creating a cron entry says to set up a script at plugins/init. Every time the container is restarted, the script is run, which causes the example script to stack an additional cron job into the crontab. Running the recurring tasks cron many times at once causes a lot of duplicate tasks.
Presumably the correct options are to either make it so plugins/init only runs at initial configuration or to make a suggested script that doesn't insert a new cron if there's an existing entry.
The text was updated successfully, but these errors were encountered: