I've created two separate databases for timetable and for my app. This is for enhanced security. This issue seems very similar: #164
Here is the command I use for creating the job:
SELECT timetable.add_job('myjob','* * * * *','SELECT public.fetch_data()','["--dbname=my_app_db"]'::jsonb);
pg_timetable says: function public.fetch_data() does not exist (SQLSTATE 42883)] [txid:1067] Task execution failed
But I can verify the function exists in the my_app_db database, in the public schema, and I can successfully execute it from terminal.
This is on Ubuntu 20.04, Postgres 14, pg_timetable 5.6.