Question: scheduler jobs with intervals smaller than a second?
ubiteixeira opened this issue · comments
Hi I was trying to add jobs with sub second intervals interval=0.1, with no success. Analyzing the code I found the interval value is being converted to an int (scheduler.py in line 207)
job.meta['interval'] = int(interval)
Is there any reason for this int conversion further the number validation? I tried to removed the conversion and everything worked as expected.
job.meta['interval'] = interval
Thanks in advanced
Not really a direct answer to your question, but if you need a subsecond job, you would be better served by a different tool. cron
won't even do less than a minute IIRC.
Hi @adamrt thanks for your answer.
The point is that is possible to schedule subsecond jobs with the rq-scheduler if other validation is performed on the job.meta['interval']. I was only wondering if there is any reason for this int conversion further than number validation.