BookmarkSubscribeRSS Feed
masiqmoselli
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? 

masiqmoselli_0-1602792323129.png

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

 

Thanks in advance.

6 REPLIES 6
SASKiwi
PROC Star

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. 

masiqmoselli
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.
SASKiwi
PROC Star

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. 

MargaretC
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.  

alkafri99
SAS Employee

Hi, 

 

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? 

 

Thanks,

Seba 

SASKiwi
PROC Star

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 

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
  • 6 replies
  • 1310 views
  • 0 likes
  • 4 in conversation