Sample Header Ad - 728x90

How put repeat jobs in pgAgent

-1 votes
1 answer
517 views
I have several data sources and create a C# app to connect to each one, download the data and insert into postgres. That create a Data Pool and I create a Timer Event to execute a store procedure to process that pool in batch of 800. The problem is sometimes the 800 batch give me a time out. So I want change that from C# timer to pgAgent. I have configure pgAgent before, but not sure how will work on this case. Lets say I set the pgAgent to execute process every min - check for the unprocess rows, select 100 and start the process. - but if after one min the process hasnt end it, pgAgent will start again and see the same 100 rows unprocessed. - Also the process need to be sequential, I cant start rows 100 to 200 until first 100 are done. - Finally if process end In more than one minute and still data in the pool, the process should start again and not wait for the pgAgent timer. In C# I just create a thread and if after the timer run off the process is still busy I just wait for another minute. So can I configure pgAgent to handle this scenerio?
Asked by Juan Carlos Oropeza (427 rep)
Feb 23, 2016, 04:30 AM
Last activity: Oct 30, 2019, 05:00 AM