I want to a cron in database using pg_cron to update the value every 90 seconds.
i am looking at this solutions Can a cron job run every 'x' seconds but this is not correct way.
also i am looking at Cron job to run a PHP script every 90 seconds between 5AM and 10PM? but runing two crons is not a viable solution if i got with this solutions and then i have to find a way to sleep the database jon for 90 secods.
If anyone has any idea please suggest me.
I want to run a cron that will run every secods in the database and it will update the value in a certain table after querying it.
An example of a function that I mentioned in comment:
This is a simplistic proof of concept and would need more work to deal with exceptions.