Community forum

Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
View
Go to last post Go to first unread
Offline SafonovPA  
#1 Posted : Wednesday, January 9, 2019 12:21:55 PM(UTC)
SafonovPA

Rank: Paid support

Joined: 8/18/2017(UTC)
Posts: 33
Russian Federation
Location: Moskovskaya oblast', Dolgoprudnyy

Was thanked: 1 time(s) in 1 post(s)
Greetings!

Got a PS task that sometimes "hangs". Only this task got this issue
Task AND job got a timeout settings set to 1 minute, but it's not working. It's impossible to stop the task - only by VisualCron service restart.
User that runs visualcron jobs doesnt have an active PS process when task hangs.
PS runtime.PNG

Code (mb this will help):
if ((Get-Service -ComputerName "bigtn12" "Rabbit TB Service").status -eq "Running")
{exit}
else {Send-MailMessage -From "VisualCronAlerts <VisualCronAlerts@berg.ru>" -To helpdesk_it@berg.ru, it_robot@berg.ru -Subject "Служба Rabbit TB Service не в состоянии 'Running', перезапустите службу" -Body (((Get-Service -ComputerName "bigtn12" | Where-Object {$_.name -eq "Rabbit TB Service"} | out-string)) + "Это письмо генерируется заданием 'Проверка статуса службы RabbitTBService' в планировщике заданий VisualCron на сервере Bigtn11.") -SmtpServer mail.brg.loc -Encoding ([System.Text.Encoding]::UTF8) }
exit


Offline Support  
#2 Posted : Wednesday, January 9, 2019 2:36:19 PM(UTC)
Support

Rank: Official support

Joined: 2/23/2008(UTC)
Posts: 10,819

Thanks: 821 times
Was thanked: 412 time(s) in 391 post(s)
When it hangs, try stopping the process TaskPowerShell.exe. Then copy standard and error output here.
Henrik
Support
http://www.visualcron.com
Please like VisualCron on facebook!
Offline SafonovPA  
#3 Posted : Wednesday, January 9, 2019 2:56:37 PM(UTC)
SafonovPA

Rank: Paid support

Joined: 8/18/2017(UTC)
Posts: 33
Russian Federation
Location: Moskovskaya oblast', Dolgoprudnyy

Was thanked: 1 time(s) in 1 post(s)
Killed process TaskPowerShell
no erros, job is still marked as running

note:
this jobe has conditions, could it be the issue?
Users browsing this topic
Guest
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2019, Yet Another Forum.NET
This page was generated in 0.207 seconds.
Scroll to Top