BookmarkSubscribeRSS Feed
Nigel_Pain
Lapis Lazuli | Level 10

SAS 9.4M5

Windows 2012R2 servers

(Windows 10 pro clients with EG 7.15 and SAS Management Console 9.4M5)

 

I've got a couple of users who I've recently set up to be able to schedule jobs via the SASMC Schedule Manager plugin and the Windows Task Scheduler. This all seems to work fine. However, one of them contacted me recently to say that a scheduled job was running and not completing, so he wanted to stop it. I was able to do that on the server by killing the process. But is there a way in which users can stop jobs which are running? They don't have direct login access to the server (eg. using RDP) so can't do what I did.

 

Thanks

7 REPLIES 7
AnandVyas
Ammonite | Level 13

Hi @Nigel_Pain 

 

Interesting ask here.. since users do not have access to the server, one way to do it could be using code. This blog post could help with some examples for this task.

 

Thanks!

Nigel_Pain
Lapis Lazuli | Level 10

Thanks @AnandVyas , I'll have to have a play with that. Although I'm not sure whether it'll work because this isn't sessions running through a specific port (in which case I may not be able to specify them with PROC IOMOPERATE), but a Windows Scheduled task which is configured from the SAS Job Scheduler and the SAS Data Step Batch Server.

 

Regards

AnandVyas
Ammonite | Level 13

Even the schedule jobs would execute by spawning a SAS Session, so I believe it would be captured in the code I have share earlier.

Nigel_Pain
Lapis Lazuli | Level 10

I just tested this using a test job which ran for 30 minutes. The IOMOPERATE program didn't show it. I think this is because it isn't actually spawned as such (ie. run via a spawner). It uses the operating system scheduler to run a .vbs script, which runs a batch SAS instance.

 

That was a potentially useful piece of code courtesy of Mr Hemedinger though.

 

Thanks

SimonDawson
SAS Employee
The spawner will not know about this process. For this problem you are trying to solve it will not work. If I think of a solution I'll pop back in here but nothing simple is coming to mind.
Nigel_Pain
Lapis Lazuli | Level 10

Hi @SimonDawson, thanks for this. I'd got pretty much the same idea via the comments in Chris Hemedinger's blog shared by @AnandVyas. Basically, if users were able to use tasklist and taskkill commands with the /s option from their workstations it might have been possible. But cmd.exe and Powershell are disabled for ordinary users on our workstations. Smiley Sad

boemskats
Lapis Lazuli | Level 10

Hi @Nigel_Pain 

 

On Tuesday I'll be presenting a SUGA webinar showing our Enterprise Session Monitor for SAS. The functionality that lets users manage their own workloads, including batch jobs, has been there for a while - have a look here, around 3mins 30sec into the first video (the one titled What is ESM).

 

Or join the webinar Tuesday - those videos are a few years old now 🙂

 

Nik

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

Get Started with SAS Information Catalog in SAS Viya

SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 7 replies
  • 3795 views
  • 1 like
  • 4 in conversation