How to delete recurring tasks in solid queue?
Solid Queue stores recurring tasks in the solid_queue_recurring_tasks table. Removing a task from config/recurring.yml does not delete the existing records.
List recurring tasks
SolidQueue::RecurringTask.pluck(:key, :class_name, :command, :schedule)
Delete a specific task
SolidQueue::RecurringTask.find_by(key: "clear_solid_queue_finished_jobs")&.destroy
Delete all recurring tasks
SolidQueue::RecurringExecution.delete_all
SolidQueue::RecurringTask.delete_all
Restart bin/jobs after deleting so the scheduler does not keep the old task in memory.
NOTE:
If Solid Queue uses a separate database, run this in an environment where SolidQueue::RecurringTask is connected to the queue database.