title: POSTGRESQL: cron job 1 connection failed
body: <p>Create a cron job to run a stored procedure with the configuration files:</p>
  <p>/etc/postgresql/12/main/postgresql.conf:</p>
  <pre><code>shared_preload_libraries = 'pg_cron'    # (change requires restart)
  cron.database_name='navstar_ankay'
  </code></pre>
  <p>/etc/postgresql/12/main/pg_hba.conf</p>
  <pre><code>host    all             all             localhost               trust
  host    all             all             0.0.0.0/0               trust
  </code></pre>
  <p>restart postgresql</p>
  <pre><code> sudo systemctl restart postgresql
  </code></pre>
  <p>record the operation to be executed and the execution interval:</p>
  <pre><code>select cron.schedule('*1/ * * * *','CALL PROCESS_GPS();','localhost','5432','navstar_ankay','admin')
  </code></pre>
  <p>when I see the execution status I get an error message:</p>
  <pre><code>2021-07-03 16:23:00.000 UTC [163769] LOG:  cron job 1 starting: CALL PROCESS_GPS();
  2021-07-03 16:23:00.013 UTC [163769] LOG:  cron job 1 connection failed
  </code></pre>
  <p>I break my head with this mistake</p>