import time from django.core.management import BaseCommand from rq.job import Job from application.tasks.example import example_task class Command(BaseCommand): def handle(self, *args, **options): task: Job = example_task.delay(1, 1) time.sleep(1) print(task.return_value())