Yes, you can use it. Create a bash script containing the pg_repack command logic, then call this bash script from a PL/pgSQL function. Finally, schedule this PL/pgSQL function using pg_cron as follows. SELECT cron.schedule('pg_repack_job', '00 3 * * 1-5', $$SELECT repackfunc();$$);