I am using hangfire in inside my web project.
// inside my controller i have added these lines
RecurringJob.RemoveIfExists("Job1");
RecurringJob.AddOrUpdate("Job1", () => Job1(), Cron.Daily(11, 47));
public void Job1() {
//Do some job
}
Thanks for the reply. My issue got solved. we must use property "Enlist=false" inside connection string when we are dealing with multiple db with same unit of work . Thank you
Hi
I am using Hangfire in my application to do some scheduled background task. but when this task is triggered its is firing an exception
WARN 2016-06-29 14:33:12,459 [duler] Hangfire.AutomaticRetryAttribute - Failed to process the job '9': an exception occurred. Retry attempt 5 of 10 will be performed in 00:04:36. System.IO.FileNotFoundException: Could not load file or assembly 'DynamicProxyGenAssembly2, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. File name: 'DynamicProxyGenAssembly2, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'
Please help me on this
Hi
I am setting up project for single instance multiple database. When i try to add tenants with connection string , i am getting an exception
System.Data.SqlClient.SqlException (0x80131904): There is already an object named 'AbpAuditLogs' in the database.
WARN 2016-06-29 14:33:12,459 [duler] Hangfire.AutomaticRetryAttribute - Failed to process the job '9': an exception occurred. Retry attempt 5 of 10 will be performed in 00:04:36. System.IO.FileNotFoundException: Could not load file or assembly 'DynamicProxyGenAssembly2, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. File name: 'DynamicProxyGenAssembly2, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type) at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName) at System.RuntimeType.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) at System.Type.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) at Hangfire.Storage.InvocationData.Deserialize()