What I have :
I have a custom timer job that runs every 1 minute. It copies data from one list to another.So the time it takes to complete varies with each request , meaning with less data it completes in secs however with thousnds of records it takes 20 mins to 30 mins.
Problem Statement :
I have a task that should only be started when timer job has completed successfullyin c# otherwise wait for the timer job to finish.
Options Tried :
Check status of running jobs : not reliable as sometimes by the time the line that checks the status , the job has finished and moved to history list.
Get status from the history list if last executed job has completed successfully : This returns all jobs that are present in the history list and there is noreliable way to identify if the last executed job has completed successfully, as there are more than one instances of the same.
Is there any other way to identify if the last executed job instance has completed successfuly in c# ?
Regards,
Parag D.
Regards, Parag