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

Potential bug when trying to schedule a job every 15 minutes + feature request #234

Open
aefruswg opened this issue Aug 18, 2023 · 1 comment

Comments

@aefruswg
Copy link

aefruswg commented Aug 18, 2023

Running a job every 15 minutes causes numerous containers to spin up for the 60 seconds between X:15 and X:16. Once time hits X:17, containers stop being created. I tested by setting a schedule for the same container to run @hourly and only one instance was created. The schedule is defined as ofelia.job-run.job.schedule: "* */15 * * * *" ` using labels in a compose file

Edit: the same behavior happens if the schedule is defined as ofelia.job-run.gfrsync.schedule: "* 15 * * * *", so this has more to do with it being set for a particular minute than repeating

I'd also like to request the ability to name a container being created by Ofelia. Using the container label with job-run doesn't name the container and I have the container set to not be deleted so we can review logs if it fails. Not the biggest deal, but having it named something that isn't an auto-generated would be helpful

Hope this is still being maintained because it's a helpful tool and there don't seem to be many alternatives

@UnwishingMoon
Copy link

UnwishingMoon commented Oct 12, 2023

Ofelia's cron work a bit different compared to the basic cron in linux.
In ofelia the first value represents the seconds and not the minutes. The other values works the same

In your case the cron * */15 * * * * means that the job runs at every second when the minute is /15
To just run the job one time at /15 the cron has to be the following: 0 */15 * * * * (if you want to run at second 0)

Can't help with the feature request at the moment

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

No branches or pull requests

2 participants