Redmine-Periodic-Task icon indicating copy to clipboard operation
Redmine-Periodic-Task copied to clipboard

Next run date constantly increasing.

Open pielat opened this issue 7 years ago • 3 comments

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 https://github.com/jperelli/Redmine-Periodic-Task/issues/25 but it makes a gap even bigger. I have cron set to run once a day at 7 am.

pielat avatar Mar 29 '18 05:03 pielat

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 :(

pielat avatar Apr 25 '18 06:04 pielat

@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

yzzy avatar Sep 25 '18 09:09 yzzy

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)

dobriand avatar Feb 05 '21 08:02 dobriand