Closed vking34 closed 4 years ago
I run the rq-scheduler with the following command: $ rqscheduler -i 10 -v
$ rqscheduler -i 10 -v
And my main.py:
main.py
from redis import Redis from rq import Queue from rq_scheduler import Scheduler from datetime import datetime, timedelta from jobs.tasks import log import time redis_connection = Redis() # queue = Queue(connection=redis_connection) scheduler = Scheduler(connection=redis_connection) job0 = scheduler.schedule( scheduled_time=datetime.utcnow(), func=log, args=['abc'], interval=5, repeat=5 ) job1 = scheduler.enqueue_in(timedelta(seconds=5), log, 'abc') print(job0.get_status()) print(job1.get_status()) time.sleep(1) print(job0.get_status()) print(job1.get_status())
but when i run the app, i got output:
None None None None
That means these jobs have not been queued ? Please help me. Thank you for reading.
You can check whether there's anything in the scheduler using scheduler.get_jobs()
scheduler.get_jobs()
@vking34 Did you find a resolution to this issue? I'm experiencing the same thing.
I run the rq-scheduler with the following command:
$ rqscheduler -i 10 -v
And my
main.py
:but when i run the app, i got output:
That means these jobs have not been queued ? Please help me. Thank you for reading.