An error occurred while creating the WebJob schedu

2019-01-22 17:53发布

I an trying to publish my website along with few WebJobs but after the website and the jobs are created on the Azure Website, I see an error on the VS.NET 2013 that says:

Error   948 An error occurred while creating the WebJob schedule: No website could be found which matches the WebSiteName [mysitename] and WebSiteUrl [http://mysitename.azurewebsites.net] supplied

my website has 2 WebJobs, 1 that runs continuously and it's created and running, but the one that needs to be triggered on a schedule is having this problem.

Any ideas as to what may be wrong here?

Edit 1

Just wanted to add that the Scheduled Job is getting created as "On Demand"

here is the settings for publishing I am using :

{
  "$schema": "http://schemastore.org/schemas/json/webjob-publish-settings.json",
  "webJobName": "ArchiveShipments",
  "startTime": "2015-01-11T00:00:00+05:30",
  "endTime": null,
  "jobRecurrenceFrequency": "Day",
  "interval": 1,
  "runMode": "Scheduled"
}

BTW after i applied AzureSDK. 2.5 I don't see any error on publishing, but the scheduled WebJob is not getting created.

9条回答
forever°为你锁心
2楼-- · 2019-01-22 18:13

I have spent all day on this. The solution for me was to do a manual deployment of the web job via uploading a ZIP and scheduling it as desired. Then, in VS, I did Add Existing Project as Web Job and publishing the Web Site updates the scheduled Web Job as expected.

查看更多
看我几分像从前
3楼-- · 2019-01-22 18:17

Updating the nuget package to the latest update, in my case 1.10.12, did the trick.

HOWEVER visual studio did not manage to remove the previous package. To do this I had to restart windows, and then before opening up visual studio, deleting the folder containing the old version of webjobs.publish.

This did the trick for me!

查看更多
Ridiculous、
4楼-- · 2019-01-22 18:18

Tried everything here and still had the same issue but I managed to resolve by doing the following:

I have a package called Microsoft.Web.WebJobs.Publish installed which was running an old version (1.0.3). I updated to the latest, currently 1.10.12, and then the app and webjob/schedule published first time.

查看更多
淡お忘
5楼-- · 2019-01-22 18:19

If you get this error when publishing from PowerShell, it probably means you are not logged into to your azure subscription or logged into the wrong subscription. If the browser is not prompting for your credentials, it's probably using the wrong subscription. If does not ask for login, clear the cookies and try again.

查看更多
我只想做你的唯一
6楼-- · 2019-01-22 18:20

I had this problem when trying to publish my webjob to a deployment slot.

The webjob got published, but the website was not found when trying to hook up the schedule.

I was able to go around this by doing 1 manual publish through the portal, and setting the schedule there. After that i could just publish from VS, and the schedule would remain untouched.

查看更多
戒情不戒烟
7楼-- · 2019-01-22 18:20

After recent updates, something changed. I was unable to publish to any of my subscriptions where I had a scheduled job. After much digging around, the solution is as follows: - Right click solution and Manage NuGet Packages for Solution - Change all Web Publish modules down to version 1.0.3

Publish. Problem solved.

查看更多
登录 后发表回答