2016-04-05 4 views
4

のためのスケジュール設定を無視して、「アズールWebjobとして公開」を選択し、設定を通過、コンソールプロジェクトに右クリックします。 私は、次の内容のプロパティ - フォルダ内に作成される「webjob-publish-settings.json」ファイルの原因のスケジュール案を選択:Azureのは、私がWebJobにVisual Studioを使用提案方法を展開WebJob

{ 
    "$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" 
} 

展開が働いている間、webjobは、「オンデマンド」の状態にあります。 Webjobはを一度実行するとAzure Portal内から手動で起動しますが、自動的には再起動しません。

私も(「新しい場合はコピー」設定で)私のプロジェクトのルートに「settings.job」を追加しようとしたん:行動でまだ何の違い

{ "schedule": "0 /5 * * * *"}

、だけでなく、無エラーメッセージ。

+0

CRON式(https://azure.microsoft.com/en-us/documentation/articles/web-sites-create-web-jobs/#CreateScheduledCRON)を使用することをお勧めします。あなたは両方の質問について同時に質問しますので、両者の間に混乱を招く可能性があります(本当に質問です)。 CRON式をうまく動作させることができない場合は、そのことに専念する質問をすることをお勧めします。 –

+0

私は2番目の設定(settings.job)を追加しました。なぜなら最初のアプローチはうまくいく可能性があるからです。 –

+0

わかりましたが、それは2つの質問をしています。 –

答えて

10

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 

これは新しいwebjob-公開-actions.jsonを作成します。

完了
{ 
     "$schema": "http://schemastore.org/schemas/json/webjob-publish-settings.json", 
     "webJobName": "MyTimer", 
     "startTime": null, 
     "endTime": null, 
     "jobRecurrenceFrequency": null, 
     "interval": null, 
     "runMode": "OnDemand" 
    } 

関連する問題