Sitecore 8:Patching an agent

南楼画角 提交于 2019-12-08 05:36:13

问题


I need to patch agent in other environment so I have created a patch as below:

 <agent type="Sitecore.Tasks.PublishAgent">
  <patch:attribute name="interval" value="01:00:00" />
  <param desc="mode (full or smart or incremental)">smart</param>
  <param desc="languages">en</param>
</agent>

Here I patch attribute using <patch:attribute name="interval" value="01:00:00" />

But how can I patch a param?.Also how can I test the same?

Thanks


回答1:


You can patch exactly as you have posted, i.e. if the param matches an existing param of the same name then it will overwrite it. There is no need for any additional patch: attributes.

You can check the final config from http://<mysite>/sitecore/admin/showconfig.aspx.




回答2:


If you want to patch param, use patch:instead:

<param desc="languages" patch:instead="param[@desc='languages']">en|pl</param>

You can test the patched values by accessing /sitecore/admin/showconfig.aspx url on your server



来源:https://stackoverflow.com/questions/33110980/sitecore-8patching-an-agent

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!