I'd like to automatically restart iis whenever there is a change in any files inside the folder in C:\inetpub\wwwroot\mywebsite\products\files using task scheduler or any script. What are the steps I need to follow to achieve this?
Asked
Active
Viewed 129 times
0
-
If your project is based on js you can achieve this by hot modules with webpack project or vite. But only in dev mode because you really need provide build files to optimize. If you have scripting server side languages such as php or asp they ever render actual script files results. But html can be cached. So there no an absolute answer. Iis, apache, nginx etc has no role to manage your file contents, just spread their results to the world. – Aloiso Junior Sep 13 '22 at 00:39
-
1You can use node.js to check if the file has changed, if so, you can call cmd to restart iis, more information you can refer to this link: [https://stackoverflow.com/a/29107865/13336642](https://stackoverflow.com/a/29107865/13336642). – samwu Sep 13 '22 at 07:44