BookmarkSubscribeRSS Feed
Obsidian | Level 7

Hi all,

At the moment on the code I'm working on I need to schedule some codes on SAS Viya. The problem is that, the default configurations I have don't support the execution interval that I need.

On Jobs and Flow when I click on "Schedule" a job and I choose Frequency: "Minute" I got just: 5, 10, 15, 20 and 30 minutes. I need to execute some codes every 2 or 1 minute.

That's any configuration or solution that I can use to start this jobs on this intervals? 


(I know it's on Portuguese-BR, but that's is my screen at this moment.)


Thanks in advance.

Opal | Level 21

How long does the job run for? What does it do? If your requirement is to run a job every minute then I'd recommend building a loop in your job which just repeats the code at minute intervals. That way if there is some delay in the process, such as table loading, it won't start doing the next one until the previous one is complete. This avoids jobs tripping over each other, if they are mean't to run one after the other. 

Obsidian | Level 7
Hello, this codes is mean't to run all day long everyday. For most of the codes it runs under 10 seconds. It's some analisys which I verify transactions, so it's close as possible of real time.
The looping in code don't sound very intresting because I will not have the log for every execution separatedely.
Opal | Level 21

At one log per minute that is 1,440 logs per day. On the other hand if you ran one job per hour each looping 60 times (one loop per minute) you will only have 24 logs to manage. As long as as you are OK with managing 1,440 logs per day, that's fine.


Regarding the interface limitation of 5-minute intervals, I suggest you track that to SAS Tech Support. 

SAS Employee

Check to see if you schedule this via the CLI (Command Line Interface) if you can do it every minute.


Also, make sure you enter an ExpireAfter value to the command so that information written for each SAS job that is run to the Postgres database can be purged with the Vacuum command.  If not you will be adding 1,440 lines to the Postgres database for every job that runs once a minute.  This will add up over time, making the Postgres database get very large.  

SAS Employee



I have the same issue. I would like to schedule a job to run every 6 seconds. Did you find a way to do that? 




Opal | Level 21

Just run a continuous job that loops and pauses between loops. Why the 6 second requirement?! That is pretty much real-time and seems to be more aligned with event stream processing.

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 

CLI in SAS Viya

Learn how to install the SAS Viya CLI and a few commands you may find useful in this video by SAS’ Darrell Barton.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 6 replies
  • 4 in conversation