Issue 9842

Title
Cron model does not clean Minute, Hour, Day and Weekday when interval type changes
Priority
bug
Status
unread
Nosy list
albertca
Assigned to
Keywords

Created on 2020-11-18.10:31:11 by albertca, last changed 2 weeks ago by albertca.

Messages

Author: [hidden] (albertca) Tryton committer
Date: 2020-11-18.10:31:09

Scenario to reproduce:

  • Create a new cron record with interval_type = months and interval_number = 1
  • Also set any of the Minute, Hour, Day or Weekday fields. For example, set Hour = 14
  • Change again the interval_type = hours and interval_number = 12
  • Save

Given that Minute, Hour, Day and Weekday fields are not cleaned when the user changes the interval_type to "hours", when next call is computed:

https://hg.tryton.org/trytond/file/tip/trytond/ir/cron.py#l96

It will take those (Minute, Hour, Day, Weekday) fields into account so the cron process, instead of executing once every 12 hours it will run more frequently.

History
Date User Action Args
2020-11-18 10:31:11albertcacreate

Showing 10 items. Show all history (warning: this could be VERY long)