-
Notifications
You must be signed in to change notification settings - Fork 187
Open
Description
代码:
[HttpGet]
public async Task<IActionResult> TestAddRecurringJobAsync() {
var result = await HangfireJobClient.AddRecurringJobAsync(
"http://localhost:3108/dashboard", // 这是正确的,我在program中配置的地址
new RecurringJob() {
JobName = "测试5点40执行",
Method = "Post",
Url = "http://localhost:3108/test/value2",
Mail = ["123123@qq.com"],
Cron = "40 17 * * *",
},
new HangfireServerPostOption { BasicUserName = "***", BasicPassword = "******" }
);
return Ok(result);
}其中用户名和密码我隐藏了
返回消息:
{"errMessage":"Forbidden","isSuccess":false}
Metadata
Metadata
Assignees
Labels
No labels