The question is as follows:
Method of recurringrob:
//The reason for the error: As you can see from the first way in the red box above, you can not specify the class to which the methodCall belongs, but the limitation of this case is that the methodCall method executed by the job belongs to the same class as the job. In this case, it does belong to the same class, but the error is still reported. RecurringJob.AddOrUpdate(recurringJobId, () => PushJobContent(), cronData, TimeZoneInfo.Local);
It is also the full version of the old honest and practical version, indicating the class to which the execution method belongs. After modification:
RecurringJob.AddOrUpdate<MessagePushAppService>(recurringJobId, x => x.PushJobContent(), cronData, TimeZoneInfo.Local);
Normal operation.
Notes:
1. Hangfire local time: timezoneinfo.local
2. UTC time: timezoneinfo.utc
Associated reading > Hangfire scheduled task method is not defined
Similar Posts:
- [Solved] Git conflict Error: commit your changes or stash them before you can merge
- Please, commit your changes or stash them before you can merge
- Rsync Error: failed to set times on “xxxx”: Operation not permitted
- Description of SFTP function error in jumpserver
- OSError: [Errno 24] Too many open files [How to Solve]
- [Solved] Git pull error: You have not concluded your merge (MERGE_HEAD exists)
- How to Solve Django Error: Uncaught SyntaxError:Unexpected token<
- Spring Boot Error: java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration [How to Solve]
- How to Solve git loose object Error (Three Methods)
- Use NPM install to report an error – operation not allowed