【问题标题】:Hangfire Recurring Job gives ERROR in second executionHangfire Recurring Job 在第二次执行时出现错误
【发布时间】:2019-09-26 14:00:10
【问题描述】:

我有一个经常性的工作,它第一次运行完美,但在下一次执行后,它给出了错误。但是,我的GetPendingTrips() 方法没有任何异常或错误。 有人可以指导我下一次重复工作的问题是什么吗?

RecurringJob.AddOrUpdate<ITripManager>(nameof(ITripManager), job => job.GetPendingTrips(), Cron.Minutely);

【问题讨论】:

    标签: asp.net-web-api2 owin hangfire hangfire-autofac


    【解决方案1】:

    我意识到 Hangfire 不会在 IIS 服务器的后台连续工作,当服务器上没有任何活动时,它会立即停止重复的工作。因此,为了运行重复作业,您需要按照本文中所述执行以下步骤。

    https://docs.hangfire.io/en/latest/deployment-to-production/making-aspnet-app-always-running.html

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-05-14
      • 1970-01-01
      • 2018-01-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多