I have this function
how i use it without a trigger ?
There are a few possible alternatives doing so without a trigger, it depends on when you want to call this function.
using cron:
*/15 * * * * psql -d mydatabase -c "interv()"
using LISTEN: https://www.postgresql.org/docs/current/sql-listen.html
Functions are used throughout your database, they can be called from within stored procedures as well. Functions should return something. So if you have a date in one format and want to convert it into a different format, you can create a function that does just that, and 'call' that function within a stored procedure, for example.