问题描述
当我在创建多个Web作业的现有站点上发布站点时,这将删除服务器上的所有文件,并删除所有Web作业.
When I publish a site on existing one where I created multiple webjobs, this deletes all the files on server and all the web jobs are deleted.
我认为这是因为webjobs存储在App_Data文件夹中.删除APP_Data目录时,将删除作业.
I assume this is because webjobs are stored in App_Data folder. When the APP_Data directory is deleted, the jobs are deleted.
如何避免在发布时删除app_data文件夹?
How can I avoid deleting the app_data folder when doing a publish?
推荐答案
安迪回答的第三个选择是将WebJobs与您的网站一起部署,只需确保WebJobs脚本位于app_data\jobs\{job type: continuous/triggered}\{job name}
下的正确位置即可.
A third option to Andy's answer would be to deploy you WebJobs with your website, just make sure the WebJobs scripts go to the right place which is under app_data\jobs\{job type: continuous/triggered}\{job name}
.
查看有关部署WebJob的更多信息: http://blog.amitapple.com/post/74215124623/deploy-azure-webjobs/
See more about deploying WebJobs: http://blog.amitapple.com/post/74215124623/deploy-azure-webjobs/
这篇关于在azure上发布网站时,将删除webjobs的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!