Exemple #1
0
        /// <summary>
        ///  系统级任务执行关闭
        /// </summary>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        public async Task StopAsync(CancellationToken cancellationToken)
        {
            try
            {
                await _jobExcutor.StopJob(cancellationToken);

                StopTimerTrigger();
            }
            catch (Exception e)
            {
                LogUtil.Error($"停止定时任务({nameof(GetType)})时出错,信息:{e}", String.Empty, "System_TimerJob");
            }
        }
Exemple #2
0
 /// <summary>
 ///  执行关闭
 /// </summary>
 /// <returns></returns>
 public virtual Task StopAsync(CancellationToken cancellationToken)
 {
     try
     {
         _jobExcutor.StopJob();
         StopTimerTrigger();
     }
     catch (Exception e)
     {
         Logger.LogError($"停止定时任务({nameof(GetType)})时出错,信息:{e}");
     }
     return(Task.CompletedTask);
 }
Exemple #3
0
        /// <summary>
        ///  系统级任务执行关闭
        /// </summary>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        public async Task StopAsync(CancellationToken cancellationToken)
        {
            await _jobExcutor.StopJob(cancellationToken);

            StopTimerTrigger();
        }