I want to do some task 10 times every hour. Or 10 times every day, or 3 times every day etc etc. I want this to be dynamic so I can just give 2 parameters, like:
generate_random_task(times, frequency)
generate_random_task(10, daily):
randomly do the task be 10 times during a day.
I must keep track of how many times the task has been done, so its stops to do it after it reached "times"
Just to make it clear, the 10 times the task must be done, must be at 10 random times
What would be a nice way to do this?
EDIT: I will hit some function every now and then (completely random), then instantly i must know if the task will run or not. So I cant used celery that will so something 10 times in the day. I need to instantly know if its YES or NO.