-
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
run-on-startup optional param for all jobs #184
base: master
Are you sure you want to change the base?
Conversation
@jtbry I've got a litte question with your PR |
@CaptainKant it is most likely a bug. The on startup jobs are started as parsed, in my testing I did not see a noticeable delay or anticipate a long blocking scenario. I’ll look at how other jobs are ran in a non blocking manner and see if it can be applied |
Ok. Just to let you know, I just noticed my workaround cause high cpu usage of the main docker-desktop process, for a strange reason. |
This should be fixed in the most recent commit. The startup job now runs in a goroutine to prevent blocking. You should be able to use it normally now without your workaround. |
When will this be released as a new docker image? |
You can use this image including this functionality |
I need this so bad 👍 |
PR mcuadros#184 run-on-startup optional param for all jobs
if you use docker compose, don't forget to add
otherwise ofelia is very likely to start first and hit an unprepared container, and you'll have to manually restart it to rertigger the jobs |
This pull request is in relation to Issue #79. I also have a use case for a data polling service that I would like to run once when the ofelia docker service starts up and then schedule from there. I stumbled across the issue and saw it open for help-wanted.
I added the RunOnStartup option to the BareJob struct to allow for it to apply to all job types.
Also added appropriate testing for RunOnStartup to the scheduler test suite
Also added documentation regarding the run-on-startup param to the jobs documentation