---
title: "Jeremy Bauman (@jb110) | Hashnode"
description: "Jeremy Bauman (@jb110) writes on Hashnode. Read their latest articles and follow their work."
url: "https://hashnode.com/@jb110"
---

@jb110

# Jeremy Bauman

@jb110 · Joined August 2023

## Comments

[This section produces "invalid SQL query", I can't seem to figure out why? I have been unable to get this process to work CREATE OR REPLACE FUNCTION schedule\_jobs() RETURNS VOID AS $$ BEGIN -- Schedule retry job SELECT cron.schedule( 'retry\_failed\_jobs', '\*/10 \* \* \* \*', $$ SELECT retry\_failed\_jobs(); $$ ); -- Schedule first job PERFORM cron.schedule( 'process\_current\_jobs\_if\_unlocked\_job\_1', '\* \* \* \* \*', $$ SELECT process\_current\_jobs\_if\_unlocked(); $$ ); -- Schedule second job with a 20-second delay PERFORM pg\_sleep(20); PERFORM cron.schedule( 'process\_current\_jobs\_if\_unlocked\_job\_2', '\* \* \* \* \*', $$ SELECT process\_current\_jobs\_if\_unlocked(); $$ ); -- Schedule third job with another 20-second delay PERFORM pg\_sleep(20); PERFORM cron.schedule( 'process\_current\_jobs\_if\_unlocked\_job\_3', '\* \* \* \* \*', $$ SELECT process\_current\_jobs\_if\_unlocked(); $$ ); END; $$ LANGUAGE plpgsql;](https://hashnode.com/posts/building-a-queue-system-with-supabase-and-postgresql/6491b48a3a9e67f9192111d8/comment/64dd14f49154427d760d219e)

Comment · Article · Aug 16, 2023 · [Building a Queue System with Supabase and PostgreSQL](https://hashnode.com/posts/building-a-queue-system-with-supabase-and-postgresql/6491b48a3a9e67f9192111d8)
