如何在特定时间终止进程并在x分钟后重新启动它?

时间:2018-06-15 04:47:34

标签: powershell powershell-v5.0

我知道如何使用Powershell杀死进程,但我想知道如何在指定时间终止进程并在几分钟后重新启动它?

EG。我想在晚上12:30杀死记事本,并在5分钟后重启。

1 个答案:

答案 0 :(得分:0)

https://www.google.co.in/amp/s/amp.reddit.com/r/PowerShell/comments/2d8hy4/pause_script_until_specific_time/

这就像魅力一样。它有自定义时间变量,最后你可以使用start-sleep变量杀死并重启进程...