How to schedule a delayed task without using hooks.py or frappe.enqueue?

Hello everyone!

Scenario:

A task is assigned to a user at a random time.

After 15 minutes, I need to check the task’s status and trigger an action based on the result.

What I’ve tried:

frappe.enqueue: Unfortunately, it doesn’t support delayed execution (e.g., scheduling a task to run after 15 minutes).

Direct RQ (Redis Queue) integration:

I added the task to the ScheduledJobRegistry using RQ’s queue.enqueue_in(timedelta(minutes=2), method, args).

The task appears in the registry but never executes after the specified time and remains stuck indefinitely.

My questions:

Is there a proper way to schedule delayed tasks in Frappe without relying on hooks.py?

Why does the RQ scheduler fail to execute the task? Are there specific configurations or steps I’m missing?

Perhaps there are other good ways to implement it?