input: def refresh_table_every_5_minutes(connection_params: dict, table_name: str):
      """ Refresh a given table of data in a PostgreSQL database every 5 minutes.
      Example:
      >>> refresh_table_every_5_minutes({'host': 'localhost', 'database': 'db', 'user': 'user', 'password': 'password'}, "TableName")
      (This function runs indefinitely and refreshes the table every 5 minutes)
      """
      import psycopg2
      from datetime import datetime, timedelta
      import schedule
      import time
  
      conn = psycopg2.connect(**connection_params)
  
      def refresh_data():
          cur = conn.cursor()
          query = f'REFRESH TABLE "{table_name}";'
          cur.execute(query)
          conn.commit()
  
      # Run the refresh_data job every 5 minutes
      schedule.every(5).minutes.do(refresh_data)
  
      while True:
          schedule.run_pending()
          time.sleep(1)
output:     conn.close()