Hello! Thank for your agent.
I would need a feature that would find "specially annotated" jobs in pga_job and run them only once when jpgAgent is started:
`
sql.properties:
sql.jpgagent.get_job_run_only_once =\
UPDATE pgagent.pga_job \
SET jobagentid=?, joblastrun=now() \
WHERE jobenabled = false\ # false = so that it does not start periodically
AND jobagentid IS NULL \
AND jobnextrun <= now() \
AND (jobhostagent = '' OR jobhostagent = ?) \
AND job_desc like '%@JOB_???%' # special annotation @JOB_RUN_ONLY_ONCE=true;
RETURNING jobid, jobname, jobdesc;
I need after a power failure, or restart the server, run some tasks only once (they generate data that is generated periodically).
jpgAgent would perform these jobs only once during the first successful connection to the postgre database