BookmarkSubscribeRSS Feed
Fluorite | Level 6


I'm using SAS VA 7.4 and I have access to SAS Studio.


I am trying to find a way to automatically schedule queries in SAS VA.


The solution must be smart enough to not run some queries if other queries failed.

The only solution I have is to schedule jobs manually or write programs in sas studio, and then

 set proper settings manually in management console.

This whole process seems to me like manual work-around, but I don't have too much experience nor knowledge

 to think otherwise.


My question is if there is any method to automatically schedule queries in sas va, so they would be dependent on each other

 (for example if one query fails, then others will not run or I will get some information in system)


Thank you.


Queries created in the Visual Analytics Data Builder query can be run on demand, or scheduled to run at a preferred time.


You can use the Visual Analytics Data Builder to create queries and/or tailor the processing with some pre/postcode and/or completely replace the generated code with user-written code.


Multi-query dependencies - not sure if/how VA would handle that (unless they were all part of a single user-written query).


Hope that helps.

Fluorite | Level 6

Thank you for your reply Andrew,


From what I found, the SAS VA is limited in case of scheduling. It does not have advanced scheduling options in itself.

That is why I 


I hope there exists some solution (even scripting in other tools having only SAS VA licence, like SAS Studio, VBS), which enables to create schedules with query dependencies

Fluorite | Level 6

I have found a solution to this by using a SQL job that I can put conditions on. SAS allows you to refresh data using a command line. This give you a large amount of flexibility in scheduling.


A person can use a batch file with just the command

cmd.exe /c C:\SAS\Config\Lev1\SASApp\BatchServer\sasbatch.bat -log C:\SAS\Config\Lev1\SASApp\BatchServer\Logs\vdb_JOBNAME_#Y.#m.#d_#H.#M.#s.log  -batch -noterminal -logparm "rollover=session"  -sysin C:\SAS\Config\Lev1\SASApp\SASEnvironment\SASCode\Jobs\


If you want to create the SQL Job, use this script.

Function New-RemoteProcess {
    Trap {
    #bail out if the object didn't get created
    if (!$wmi) {return}

New-RemoteProcess -comp "SASSERVER" -cmd 'cmd.exe /c C:\SAS\Config\Lev1\SASApp\BatchServer\sasbatch.bat -log C:\SAS\Config\Lev1\SASApp\BatchServer\Logs\vdb_JOBNAME_#Y.#m.#d_#H.#M.#s.log  -batch -noterminal -logparm "rollover=session"  -sysin C:\SAS\Config\Lev1\SASApp\SASEnvironment\SASCode\Jobs\'

Fluorite | Level 6

Thank you DrTwoLittle for your answer.

I like it, but it still does not answer to my problem.

How I understand your solution, is that it just creates the job.

The problem is where I want to create scheduled jobs relationships.

The scheduled jobs are meant to run by itself when the scheduler want it, and I want to automatically create scheduled dependencies



Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

Tips for filtering data sources in SAS Visual Analytics

See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 3 in conversation