I have a scheduler (created with c#) running in multiple machines, accessed a single database. on the table there are list of job to do. like below:
ID JobDetail Flag
1 --- 1
2 --- 0
3 --- 0
Flag:
0: open, 1: inprogress, 2: completed
my question is what should i do to make sure that there will no scheduler execute the same job.
sorry this question should be very general, if there is a dupe please point me a link.
try something like this:
Now Use @CURR_JOBID for further processing
Once the job is finished, update the Flag to 2