Ole*_*ers 6 azure azure-webjobs
我使用Visual Studio以建议的方式部署了WebJob,右键单击控制台项目,选择"Publish as Azure Webjob"并浏览设置.我选择了一个计划的计划,导致webjob-publish-settings.json在Properties-Folder中创建文件" ",其中包含以下内容:
{
"$schema": "http://schemastore.org/schemas/json/webjob-publish-settings.json",
"webJobName": "TestCredentials2",
"startTime": "2016-04-05T01:00:00+01:00",
"endTime": "2016-04-12T00:00:00+01:00",
"jobRecurrenceFrequency": "Minute",
"interval": 3,
"runMode": "Scheduled"
}
Run Code Online (Sandbox Code Playgroud)
部署工作时,webjob处于"按需"状态.当我从Azure门户手动启动Webjob 时,它运行一次,但不会自动重启.
我还尝试在settings.job项目的根目录中添加一个" "(设置为"如果更新则复制"):
{ "schedule": "0 /5 * * * *" }
行为仍然没有区别,但也没有错误信息.
Ole*_*ers 18
它确实使用这种settings.job方法.必须完成以下事项:
1. Create a settings.job with the content in the question
2. select Build Action "Content" for that file
3. Select "Copy if newer"
4. Delete the generated "Properties/webjob-publish-actions.json"
5. Re-Publish the Project, chose "On Demand" instead of a schedule plan
Run Code Online (Sandbox Code Playgroud)
这会创建一个新的webjob-publish-actions.json:
{
"$schema": "http://schemastore.org/schemas/json/webjob-publish-settings.json",
"webJobName": "MyTimer",
"startTime": null,
"endTime": null,
"jobRecurrenceFrequency": null,
"interval": null,
"runMode": "OnDemand"
}
Run Code Online (Sandbox Code Playgroud)
完成.
| 归档时间: |
|
| 查看次数: |
4780 次 |
| 最近记录: |