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

Cron jobs do not work per schedule if its frequency is shorter than the check-in time of worker #153

Open
vineyyadav opened this issue Oct 16, 2020 · 2 comments
Labels

Comments

@vineyyadav
Copy link
Contributor

Expected/Wanted Behavior

If a cron job app is created and configured to run every 2 minutes, it should run every 2 minutes. This behavior should be independent of the check-in of the worker

Actual Behavior

If the cron job schedule is shorter than the check-in time of worker, the job does not get scheduled on time.

Steps to Reproduce the Problem

  1. Run the worker container with check-in time of 5 minutes
  2. Create a cron job app with schedule of 2 minutes.
  3. The cron job container does not get launched every 2 minute instead it gets launched only after 5 minutes
@issue-label-bot issue-label-bot bot added the bug label Oct 16, 2020
@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.93. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@naorlivne
Copy link
Member

naorlivne commented Oct 18, 2020

Currently the cron job is checked as part of the main loop which runs every nebula_manager_check_in_time, you're correct that in some cases (which I'm assuming you ran into one), it might be needed to have a cron running sooner then the manager checkin time.

Getting there will likely need to create a separate thread to manage the cron jobs run scheduling outside the main loop, it will take a bit of work as threading main functions will also mean a lot of work will be needed to cover all the edge cases (I don't want to introduce new bugs just by solving one) but it definitely should be on the project todo list.

P.S.
If you (or anyone) else want to tackle it feel free, just please raise a note of it on this issue so I'll know not to work on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants