BookmarkSubscribeRSS Feed
Doug____
Pyrite | Level 9

Is there any way this can be done? Sometimes our scheduler breaks which requires manual open and execution of each project (100+) one at a time which is very time consuming. 

PS: I cannot execute scripts on the server so it has to be done another way.

5 REPLIES 5
ballardw
Super User

First thing I would suggest is getting with your IT staff and determining why the Windows Scheduler "gets broken" and fix that. This could be a symptom of other, possibly worse, problems developing in the system.

Or possibly invest in a different scheduler that doesn't break.

 

If you can't execute scripts then who can? Any non-manual system is likely going to require some script and permissions.

Doug____
Pyrite | Level 9

1. Why scheduler breaks - don't know why; outside my area of influence

2. Invest in another scheduler - have no control over this piece

3. Who can execute?  Likely someone in IT who is not a SAS user.

 

I need another way to do this that does not involve using VB scripts; e.g. running a series of projects from another project.

 

Kurt_Bremser
Super User

Save your projects as .sas program files to the server and use the sasbatch script from the BatchServer subdirectory with server-side scheduling. Windows(!) desktop(!) scheduling is bound to cause problems sooner or later. With 100+ jobs, you enter the realm of professional IT, so you should act like it.

AlanC
Barite | Level 11

Are you allowed to run PowerShell scripts on your machine? Test using a simple Hello World script. See https://therenegadecoder.com/code/hello-world-in-powershell/

https://github.com/savian-net
ChrisHemedinger
Community Manager

If Windows Scheduler is unreliable, you can still use your own command-line to run the automation script on your own.    That's the only way you can drive this execution from EG (when you cannot use batch SAS, as some have suggested).

 

This article shows several things you can do with automation.

 

At its most simple, the scheduled task for an EG project kicks off a script command like this (for 32-bit EG):

 

 %windir%\SysWOW64\cscript.exe <path to script>\EGScript1.vbs

 

64-bit EG is similar:

  %windir%\System32\cscript.exe <path to script>\EGScript1.vbs

 

The script is generated by EG when you schedule a project, and it's set to launch EG and run the project (or a single flow).  But you can create more complex scripts that run multiple flows in succession, in the sequence that you want.  See the examples in the article I referenced.

 

 

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 1516 views
  • 0 likes
  • 5 in conversation