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

Next run date constantly increasing. #79

Open
pielat opened this issue Mar 29, 2018 · 3 comments
Open

Next run date constantly increasing. #79

pielat opened this issue Mar 29, 2018 · 3 comments

Comments

@pielat
Copy link

pielat commented Mar 29, 2018

Hello,
I'm in GMT+1 timezone. When I set next run time to 6am task is created at 7 am in my timezone as expected BUT next runtime is automatically is 7am UTC so next time it will be 8am in my timezone ...
I tried to use a tip from #25 but it makes a gap even bigger.
I have cron set to run once a day at 7 am.

@pielat
Copy link
Author

pielat commented Apr 25, 2018

I've discovered that next run date is only shifting when interval is set for business days. There is a function
in lib/scheduled_tasks_checker.rb about it:
if units.downcase == "business_day" task.next_run_date = task.interval_number.business_day.after(now) else if (interval > 0) interval_steps = ((now - task.next_run_date) / interval.send(units.downcase)).ceil task.next_run_date += (interval * interval_steps).send(units.downcase) end end
but I'm not sure how can I change it to make it working :(

@yzzy
Copy link
Contributor

yzzy commented Sep 25, 2018

@pielat do you set correct (GMT+1) timezone in Redmine's config/application.rb?
I don't see any shifting (except for cron delay) with my configured timezone.
BTW list of timezones can be obtained by running rake time:zones:all

gainskills pushed a commit to gainskills/Redmine-Periodic-Task that referenced this issue Jan 6, 2020
gainskills added a commit to gainskills/Redmine-Periodic-Task that referenced this issue Jan 6, 2020
@dobriand
Copy link

dobriand commented Feb 5, 2021

My problem is the same, the time increases each time and more annoying, independently of the time I set the next run (01h for ex.), once it's done the next run will be set to 9 o clock...(10 if I m GMT +1)

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

3 participants