sympa-community / sympa

Sympa, Mailing List Management Software
https://www.sympa.community/sympa
GNU General Public License v2.0
243 stars 97 forks source link

Improve task manager time handling #603

Open dverdin opened 5 years ago

dverdin commented 5 years ago

Expected Behavior

In task manager, it would be cool to be able to : 1- define the interval between tasks execution in a user friendly formalism, such as "1d" instead of "86264", 2- execute some tasks at fixed time instead of fixed interval. For example: "everyday at 6PM".

Current Behavior

Currently, we can only define the interval beween two executions in seconds. And the first execution date defines the next one and the next and so on.

Possible Solution

Context

It would be nice for users to have a simpler formalism. The fixed time excution would be nice for people having fixed time database maintenance, to make sure synchronizations don't happen during it.

ikedas commented 5 years ago

On 2, we would use the other measures like cron (and we would be happy leaving from duty to maintain code for task management!).

However, it also might cause problem, e.g. when a hourly task didn’t finish in one hour.

dverdin commented 5 years ago

I'm not sure about cron. The problems I foresee are:

On the opposite, making fixed time tasks does just require to change the way we compute the epoch time in the task name that will determine when is the task executed.

ikedas commented 5 years ago

I don’t concider about method to add tasks to crontab. I think it may be solved relatively easily.

I think the problem with fixed execution time looks not so easy to solve.