Esempio n. 1
0
 public async Task RunBatchJobAsync()
 {
     using (var taskExecutionContext = _tasklingClient.CreateTaskExecutionContext("MyApplication", "MyNumericBasedBatchJob"))
     {
         if (await taskExecutionContext.TryStartAsync())
         {
             await RunTaskAsync(taskExecutionContext);
         }
     }
 }
 public void RunBatchJob()
 {
     using (var taskExecutionContext = _tasklingClient.CreateTaskExecutionContext("MyApplication", "MyNumericBasedBatchJob"))
     {
         if (taskExecutionContext.TryStart())
         {
             RunTask(taskExecutionContext);
         }
     }
 }