39 Star 221 Fork 51

chuanjiao10 / kasini3000

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
u库定时任务_线程级别_读pid.ps1 789 Bytes
一键复制 编辑 Web IDE 原始数据 按行查看 历史
chuanjiao10 提交于 2023-04-09 14:49 . 任务计划突破性更新
#建议保存编码为:bom头 + utf8
#
if ( ($IsWindows -eq $True) -or ($PSVersionTable.psversion.major -lt 6) ) #win
{
& 'c:\ProgramData\kasini3000\0k_source.ps1'
}
if ($IsLinux -eq $True)
{
& '/etc/kasini3000/0k_source.ps1'
}
$log日志文件全目录 = "${global:kasini3000_data_path}"
if (Test-Path -LiteralPath $log日志文件全目录)
{
$u库定时任务的pid文件 = "$log日志文件全目录/u库_线程级别_pid.txt"
if (Test-Path -LiteralPath $u库定时任务的pid文件)
{
try
{
$upid = Get-Content -LiteralPath $u库定时任务的pid文件 -ErrorAction Stop
return $upid
}
catch
{
Write-Error '错误:读取失败。返回码2'
exit 2
}
}
}
else
{
Write-Error '错误:找不到日志文件目录。返回码1'
exit 1
}
PowerShell
1
https://gitee.com/chuanjiao10/kasini3000.git
git@gitee.com:chuanjiao10/kasini3000.git
chuanjiao10
kasini3000
kasini3000
master

搜索帮助