Keyan fd2008e5d1
reintroduce daily rewards (#1134)
* reintroduce daily rewards

* update reward sponsor

* daily rewards countdown

* update rewards job schedule
2024-05-01 09:30:36 -05:00

15 lines
312 B
PL/PgSQL

CREATE OR REPLACE FUNCTION reschedule_earn_job()
RETURNS INTEGER
LANGUAGE plpgsql
AS $$
DECLARE
BEGIN
UPDATE pgboss.schedule set cron = '0 0 * * *' WHERE name = 'earn';
return 0;
EXCEPTION WHEN OTHERS THEN
return 0;
END;
$$;
SELECT reschedule_earn_job();
DROP FUNCTION IF EXISTS reschedule_earn_job;