【发布时间】:2020-04-01 00:30:03
【问题描述】:
我创建了一个 ASP.NET Core 3.1 WebAPI 项目,其中我还实现了对外部 api 服务的一些 API 调用,然后将其导入并保存到我的本地数据库。
假设我有一个路由“/imports/mymethod”,它将触发导入运行。
现在我想将此作为 Windows 计划任务,例如每 10 分钟运行一次。
When I execute the "exe" file "myproject.exe" it says:
Microsoft.Hosting.Lifetime[0]
Now listening on: http://localhost:5000"
是否可以编译我的项目并使用“myproject.exe -path http://localhost:5000/imports/mymethod”之类的参数运行编译后的exe文件然后它将使用该方法运行路由?
或者还有其他方法可以实现吗?
最好的问候
【问题讨论】:
标签: asp.net-core asp.net-core-webapi