Exploring, predicting and reporting with SAS Visual Analytics and SAS Visual Statistics

Smart scheduling in SAS VA

Occasional Contributor
Posts: 9

Smart scheduling in SAS VA


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.

Posts: 329

Re: Smart scheduling in SAS VA

Posted in reply to jakubniescior

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.

Occasional Contributor
Posts: 9

Re: Smart scheduling in SAS VA

Posted in reply to AndrewHowell

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

New Contributor
Posts: 4

Re: Smart scheduling in SAS VA

Posted in reply to jakubniescior

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\vdb_JOBNAME.sas


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\vdb_JOBNAME.sas'

Occasional Contributor
Posts: 9

Re: Smart scheduling in SAS VA

Posted in reply to DrTwoLittle

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

Ask a Question
Discussion stats
  • 4 replies
  • 3 in conversation