Forum Discussion
Run Hours on Selected date
Your start time is too granular. It would be better to agree to start times at the top of the hour only to avoid having to go down to minute or second level granularity (for example second level accuracy would require 86400 rows per day).
Do you have other repeat_by values too?
I have a 2000 tasks in my table that have a repeat_by - days, weeks, months, years, for those items i have created measure to find the next rundates, it can acheived easily.
| task_name | repeat_by | repeat_every | start_date | start_time | End_Date | End_Time |
| TASK X | hours | 1 | 20-02-24 | 7:30:00 PM | null | null |
| TASK Y | hours | 1 | 08-02-24 | 3:15:00 PM | 22-05-24 | 5:00:00 PM |
| TASK Z | hours | 6 | 08-02-24 | 8:41:31 AM | 12-03-24 | 9:15:00 AM |
| TASK A | hours | 1 | 27-08-23 | 11:43:58 AM | null | null |
| TASK B | days | 1 | 01-01-24 | 12:00:00 AM | 26-12-24 | 12:00:AM |
| TASK C | weeks | 2 | 01-01-24 | 3:00:00 AM | null | null |
| TASK D | months | 1 | 01-01-24 | 4:00:00 AM | null | null |
| TASK E | years | 1 | 01-01-24 | 5:00:00 AM | null | null |
i have provided the above measure, how i have found the next_run_dates of the tasks.
please help me to get this done for hours logic.
- lbendlin2 years ago
Super User
That measure includes a couple of fallacies. Not all months have 30 days, and not all years have 365 days. What should your schedule be like that starts on Jan 31 and repeats every month?
- Navaneetharaju_2 years ago
Helper II
Hi lbendlin ,
As of now, we could find the next iteration date based on that data they provided. for month is 30 days intervel and year is 365 days intervel, we don't have the majority of tasks in months and years intervel. only few are running, these one or two counts not much impacted in servers.
Hours and minutes tasks are creating more impact on the server, because one task could run many times in a day.