1

我们在 Windows 机器上使用了 VisualSVN Server 2.5.8。每当 VisualSVN 服务器重新启动时,我们都必须调用脚本。

我们如何在 VSVN 启动时调用脚本?

4

1 回答 1

0

获取服务器启动时间

您无需运行任何特殊脚本即可知道 VisualSVN 服务器何时启动、重新启动或停止。与 VisualSVN 服务器服务相关的事件始终写入“VisualSVN 服务器”Windows 事件日志。因此,您可以通过 Windows 事件查看器手动检查日志或使用 PowerShell 脚本。这是一个脚本示例:

Get-EventLog -LogName VisualSVNServer | Where-Object {$_.Message -Match "resuming normal operations"}

注意: Get-EventLog cmdlet 从 PowerShell 3.0 开始可用。换言之,PowerShell 1.0 和 2.0 不包含此 cmdlet。

于 2015-08-20T11:56:37.890 回答