Supabase postgres cron job not working special case
0
votes
1
answer
1119
views
I'm having the problem, while insering a row using rpc through the nodejs library, with user **service_role**.
i gave permission to all roles. Without exception.
And for **service_role** I even gave it all privileges in the whole database just for the sake of testing.
launching the cron from the dashboard editor. And after giving the permission to **postgres** as above. And as per this thread
It worked. The cron worked just right. But then when i do it through **service_role**. From nodejs rpc insert. Which trigger a trigger procedure. Which run all right. I made a command to ccheck which insert in a log table I created. In mean time, the job is added to the jobs table. And being active. However no command run. (the mentioned user I gave him the privileges for cron. But then after I gave him even access to all. Nothing works.) Any ideas or pointing. Here my trigger function
The schedule command is temporal I took from the one that worked on the dashboard to make sure ..?
How can this be explained ? Any ideas or points ? Anything may be special about supabase ? May be the **service_role** user have some restriction ??? or . i'm just out of clues hhh
( an official ref: https://supabase.io/blog/2021/03/05/postgres-as-a-cron-server )
It worked. The cron worked just right. But then when i do it through **service_role**. From nodejs rpc insert. Which trigger a trigger procedure. Which run all right. I made a command to ccheck which insert in a log table I created. In mean time, the job is added to the jobs table. And being active. However no command run. (the mentioned user I gave him the privileges for cron. But then after I gave him even access to all. Nothing works.) Any ideas or pointing. Here my trigger function

Asked by Mohamed Allal
(111 rep)
Aug 3, 2021, 10:08 PM
Last activity: Jul 6, 2022, 08:01 AM
Last activity: Jul 6, 2022, 08:01 AM